diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-09-12 16:13:04 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-09-12 16:13:04 +0000 |
commit | 2bfb72ee0679082ba87dfbfc63561a281acee408 (patch) | |
tree | 4849e1ddc96f759dd8c5b0a812494e948b523333 /gdb | |
parent | 4f17c3c1492356e02695ced1f0741b9b33c2a59e (diff) | |
download | gdb-2bfb72ee0679082ba87dfbfc63561a281acee408.zip gdb-2bfb72ee0679082ba87dfbfc63561a281acee408.tar.gz gdb-2bfb72ee0679082ba87dfbfc63561a281acee408.tar.bz2 |
2004-09-12 Andrew Cagney <cagney@gnu.org>
* valprint.c (print_longest): Use fputs_filtered. Make "val"
const.
* Makefile.in (valprint.o): Delete explict rule.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/Makefile.in | 6 | ||||
-rw-r--r-- | gdb/valprint.c | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 649d07b..389dc0d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2004-09-12 Andrew Cagney <cagney@gnu.org> + * valprint.c (print_longest): Use fputs_filtered. Make "val" + const. + * Makefile.in (valprint.o): Delete explict rule. + * config/m68k/nbsdelf.mh: Add missing trailing newline. Problem reported by Dave Anderson. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index cf29fad..a8fcd73 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1465,12 +1465,6 @@ v850ice.o: $(srcdir)/v850ice.c $(GDBTK_CFLAGS) \ $(srcdir)/v850ice.c -# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with -# -Wformat-nonliteral. It relies on local_hex_format et.al. and -# that's a mess. It needs a serious overhaul. -valprint.o: $(srcdir)/valprint.c - $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c - # Message files. Based on code in gcc/Makefile.in. diff --git a/gdb/valprint.c b/gdb/valprint.c index 64216f8..fd92750 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -230,7 +230,8 @@ void print_longest (struct ui_file *stream, int format, int use_c_format, LONGEST val_long) { - char *val; + const char *val; + switch (format) { case 'd': @@ -253,8 +254,7 @@ print_longest (struct ui_file *stream, int format, int use_c_format, default: internal_error (__FILE__, __LINE__, "failed internal consistency check"); } - - fprintf_filtered (stream, val); + fputs_filtered (val, stream); } /* This used to be a macro, but I don't think it is called often enough |