ldlex: Fix sign-compare warning, suppress -Wstack-usage.
authorMark Wielaard <mjw@redhat.com>
Wed, 7 Oct 2015 11:58:26 +0000 (13:58 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 12 Oct 2015 10:22:59 +0000 (12:22 +0200)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/Makefile.am
src/ldlex.l

index ef09a09..796878f 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-07  Mark Wielaard  <mjw@redhat.com>
+
+       * Makefile.am (ldlex_no_Wstack_usage): New.
+       * ldlex.l ([RWX]): Make cnt unsigned.
+
 2015-10-09  Josh Stone  <jistone@redhat.com>
 
        * elflint.c (main): Replace stat64 and fstat64 with stat and fstat.
index afb38fc..04ae3cb 100644 (file)
@@ -89,6 +89,7 @@ endif
 # XXX While the file is not finished, don't warn about this
 ldgeneric_no_Wunused = yes
 ldgeneric_no_Wstack_usage = yes
+ldlex_no_Wstack_usage = yes
 
 # Bad, bad stack usage...
 readelf_no_Wstack_usage = yes
index bfc8bbe..835c2dc 100644 (file)
@@ -146,7 +146,7 @@ SIZEOF_HEADERS                      { return kSIZEOF_HEADERS; }
 SORT                           { return kSORT; }
 VERSION                                { return kVERSION; }
 
-"["([RWX]){0,3}"]"             { int cnt = 1 ;
+"["([RWX]){0,3}"]"             { unsigned int cnt = 1 ;
                                  ldlval.num = 0;
                                  while (cnt < yyleng - 1)
                                    ldlval.num |= attrib_convert (yytext[cnt++]);