diff options
author | Nick Clifton <nickc@redhat.com> | 2008-06-17 16:01:28 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-06-17 16:01:28 +0000 |
commit | 66f53bd615b6e54b6b5e46b1f9df7f638f74fbdd (patch) | |
tree | 9e327c5e3ce1dd8ee41b513fde9bdbee51c979d1 /gas/app.c | |
parent | d49cfff43bdef074c852197ac97ffcec9fb2dfce (diff) | |
download | binutils-redhat-66f53bd615b6e54b6b5e46b1f9df7f638f74fbdd.tar.gz |
* app.c (do_scrub_chars): Do not UNGET an EOF value.
* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this
macro which does not trigger an array bounds warning in gcc.
(PUT_SCNHDR_NLNNO): Likewise.
(GET_SCNHDR_FLAGS): Likewise.
(PUT_SCNHDR_FLAGS): Likewise.
(GET_SCNHDR_PAGE): Likewise.
(PUT_SCNHDR_PAGE): Likewise.
Diffstat (limited to 'gas/app.c')
-rw-r--r-- | gas/app.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -676,7 +676,7 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen) if (ch == '\'') /* Change to avoid warning about unclosed string. */ PUT ('`'); - else + else if (ch != EOF) UNGET (ch); break; #endif @@ -1097,7 +1097,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen) ch2 = GET (); if (ch2 != '-') { - UNGET (ch2); + if (ch2 != EOF) + UNGET (ch2); goto de_fault; } /* Read and skip to end of line. */ @@ -1283,7 +1284,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen) state = 9; if (!IS_SYMBOL_COMPONENT (ch)) { - UNGET (ch); + if (ch != EOF) + UNGET (ch); break; } } @@ -1407,4 +1409,3 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen) return to - tostart; } - |