This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: remove warning message in printcmd.c


The attached patch removes a warning that occurs after my changes to printcmd.c. It simply initializes the val_long immediate variable.

Checked in as obvious.


-- Jeff J.


2004-02-23 Jeff Johnston <jjohnstn@redhat.com>

        * printcmd.c (print_scalar_formatted): Initialize val_long
        to remove compiler warning message.
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.75
diff -u -r1.75 printcmd.c
--- printcmd.c	19 Feb 2004 22:43:03 -0000	1.75
+++ printcmd.c	23 Feb 2004 19:40:39 -0000
@@ -347,7 +347,7 @@
 print_scalar_formatted (void *valaddr, struct type *type, int format, int size,
 			struct ui_file *stream)
 {
-  LONGEST val_long;
+  LONGEST val_long = 0;
   unsigned int len = TYPE_LENGTH (type);
 
   if (format != 'f')

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]