2004-09-12 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Sun, 12 Sep 2004 16:13:04 +0000 (16:13 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 12 Sep 2004 16:13:04 +0000 (16:13 +0000)
* valprint.c (print_longest): Use fputs_filtered.  Make "val"
const.
* Makefile.in (valprint.o): Delete explict rule.

gdb/ChangeLog
gdb/Makefile.in
gdb/valprint.c

index 649d07b57f6f8355d44f5935969299d15caa2510..389dc0de2ebdf56a32b4726f1b62cfe3e9428c58 100644 (file)
@@ -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.
 
index cf29fade1cd2394d7aed11b84939c8b490665f42..a8fcd7321bc482897cd2e3642d86d82ef548f71c 100644 (file)
@@ -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.
 
index 64216f85f0b88cefa5376cef583f38b52c593d26..fd92750b8c62ca19517b81febc7cf1784ced20d6 100644 (file)
@@ -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
This page took 0.034884 seconds and 4 git commands to generate.