]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
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 ef09a091e2ed7131b6cf2a8cd9a0df72119af276..796878f8e1e58088e838d099ed2772af6543fe25 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 afb38fc0f31384a3e61ccccdc6c5bf4b569518c2..04ae3cbc51ff8be139f1b92edfb0140afedfa9a4 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 bfc8bbe53c2b8200055f5ea15a2751f9330bb2c5..835c2dc16f596b22322ea09647187c77fd37264e 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++]);