aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2005-04-29 00:03:33 +0000
committerBen Elliston <bje@au.ibm.com>2005-04-29 00:03:33 +0000
commit85b1c36d3172747a7587cbae0f5db46de2bffcd6 (patch)
treea794561d12ed4fc24570e56ff3ed2c51ec02424f /binutils/cxxfilt.c
parentdaily update (diff)
downloadbinutils-gdb-85b1c36d3172747a7587cbae0f5db46de2bffcd6.tar.gz
binutils-gdb-85b1c36d3172747a7587cbae0f5db46de2bffcd6.tar.bz2
binutils-gdb-85b1c36d3172747a7587cbae0f5db46de2bffcd6.zip
* ar.c (mri_mode): Make static.
* arsup.c (obfd, real_name, outfile): Likewise. * binemul.c (ar_emul_create): Remove unused function. (ar_emul_default_create): Likewise. * binemul.h (ar_emul_create): Remove declaration. (ar_emul_default_create): Likewise. (struct bin_emulation_xfer_struct): Remove ar_create member. * bucomm.c (report): Make static. * bucomm.h (report): Remove declaration. * cxxfilt.c (mbuffer): Make static. (main): Use unsigned ints for some loop control variables. * readelf.c: Make many global variables static. * size.c (berkeley_format): Make static. (long_options): Likewise. * emul_aix.c (bin_aix_emulation): Remove ar_emul_default_create structure initialiser. (bin_aix5_emulation): Likewise. * emul_vanilla.c (bin_vanilla_emulation): Likewise.
Diffstat (limited to 'binutils/cxxfilt.c')
-rw-r--r--binutils/cxxfilt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/binutils/cxxfilt.c b/binutils/cxxfilt.c
index 1b297fd9da3..3fe1fd5d138 100644
--- a/binutils/cxxfilt.c
+++ b/binutils/cxxfilt.c
@@ -92,8 +92,7 @@ Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\
exit (status);
}
-#define MBUF_SIZE 32767
-char mbuffer[MBUF_SIZE];
+static char mbuffer[32767];
int strip_underscore = 0;
@@ -243,19 +242,19 @@ main (int argc, char **argv)
for (;;)
{
- int i = 0;
+ unsigned i = 0;
c = getchar ();
/* Try to read a label. */
while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
{
- if (i >= MBUF_SIZE-1)
+ if (i >= sizeof (mbuffer) - 1)
break;
mbuffer[i++] = c;
c = getchar ();
}
if (i > 0)
{
- int skip_first = 0;
+ unsigned skip_first = 0;
mbuffer[i] = 0;
if (mbuffer[0] == '.' || mbuffer[0] == '$')