diff options
author | nccuong <cao.cuong.ngo@gmail.com> | 2013-03-04 15:25:02 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-06 12:59:26 +0000 |
commit | a6b91730053fc61416716ae176081b91de52532b (patch) | |
tree | 192e578875f9abe82ca535e3cb794944bac9d9aa /rsc/source | |
parent | Resolves: #i120306# cleanup failed loading of problematic jpeg (diff) | |
download | core-a6b91730053fc61416716ae176081b91de52532b.tar.gz core-a6b91730053fc61416716ae176081b91de52532b.zip |
fdo#60148 Clean up warnings from the Clang compiler plugin
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/rscpp/cpp5.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 42bf271878ff..43f47366da66 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -411,20 +411,20 @@ again: do { /* Collect the token */ } else if (t == LET) { /* ID must be a macro */ if (streq(token, "defined")) { /* Or defined name */ - c1 = c = skipws(); - if (c == '(') /* Allow defined(name) */ - c = skipws(); - if (type[c] == LET) { - evalue = (lookid(c) != NULL); - if (c1 != '(' /* Need to balance */ - || skipws() == ')') /* Did we balance? */ - return (DIG); /* Parsed ok */ - } - cerror("Bad #if ... defined() syntax", NULLST); - return (OP_FAIL); + c1 = c = skipws(); + if (c == '(') /* Allow defined(name) */ + c = skipws(); + if (type[c] == LET) { + evalue = (lookid(c) != NULL); + if (c1 != '(' /* Need to balance */ + || skipws() == ')') /* Did we balance? */ + return (DIG); /* Parsed ok */ + } + cerror("Bad #if ... defined() syntax", NULLST); + return (OP_FAIL); } else if (streq(token, "sizeof")) /* New sizeof hackery */ - return (dosizeof()); /* Gets own routine */ + return (dosizeof()); /* Gets own routine */ /* * The Draft ANSI C Standard says that an undefined symbol * in an #if has the value zero. We are a bit pickier, @@ -433,7 +433,7 @@ again: do { /* Collect the token */ */ #ifdef STRICT_UNDEF if (!skip) - cwarn("undefined symbol \"%s\" in #if, 0 used", token); + cwarn("undefined symbol \"%s\" in #if, 0 used", token); #endif evalue = 0; return (DIG); @@ -633,13 +633,13 @@ evalnum(int c) for (;;) { c1 = c; if (isascii(c) && isupper(c1)) - c1 = tolower(c1); + c1 = tolower(c1); #ifdef EBCDIC if (c1 <= 'f') #else if (c1 >= 'a') #endif - c1 -= ('a' - 10); + c1 -= ('a' - 10); else c1 -= '0'; if (c1 < 0 || c1 >= base) break; |