From 1aa1a433210c6822de8bffb959df3efabe514868 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 26 Jan 2017 13:38:57 -0600 Subject: [PATCH] Revert "libpkgconf: pkg: warn when encountering trailing whitespace" This reverts commit 2fa4fd09d02905e07397c2617bb1be735f6cd96b. --- libpkgconf/pkg.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 4330c96..ccf10f6 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -238,7 +238,6 @@ pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, pkgconf_pkg_t *pkg; char readbuf[PKGCONF_BUFSIZE]; char *idptr; - size_t lineno = 0; pkg = calloc(sizeof(pkgconf_pkg_t), 1); pkg->filename = strdup(filename); @@ -258,9 +257,6 @@ pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, while (pkgconf_fgetline(readbuf, PKGCONF_BUFSIZE, f) != NULL) { char op, *p, *key, *value; - bool warned_key_whitespace = false, warned_value_whitespace = false; - - lineno++; p = readbuf; while (*p && (isalpha((unsigned int)*p) || isdigit((unsigned int)*p) || *p == '_' || *p == '.')) @@ -272,13 +268,6 @@ pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, while (*p && isspace((unsigned int)*p)) { - if (!warned_key_whitespace) - { - pkgconf_error(client, "%s:%zu: warning: whitespace encountered while parsing key section\n", - pkg->filename, lineno); - warned_key_whitespace = true; - } - /* set to null to avoid trailing spaces in key */ *p = '\0'; p++; @@ -295,13 +284,6 @@ pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, p = value + (strlen(value) - 1); while (*p && isspace((unsigned int) *p) && p > value) { - if (!warned_value_whitespace && op == '=') - { - pkgconf_error(client, "%s:%zu: warning: trailing whitespace encountered while parsing value section\n", - pkg->filename, lineno); - warned_value_whitespace = true; - } - *p = '\0'; p--; }