diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-10-07 13:58:26 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-10-12 12:22:59 +0200 |
commit | 9b9666838eb8b3101bf461ae5e919b415657a0d1 (patch) | |
tree | c5893b400b742bf7b1711ab710001e6ba17d987c | |
parent | 7b74830ec65081a8ea1be6d544ccd6ed0c61eaa1 (diff) | |
download | elfutils-9b9666838eb8b3101bf461ae5e919b415657a0d1.tar.gz |
ldlex: Fix sign-compare warning, suppress -Wstack-usage.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/ldlex.l | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ef09a091..796878f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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. diff --git a/src/Makefile.am b/src/Makefile.am index afb38fc0..04ae3cbc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/ldlex.l b/src/ldlex.l index bfc8bbe5..835c2dc1 100644 --- a/src/ldlex.l +++ b/src/ldlex.l @@ -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++]); |