diff options
author | K. Richard Pixley <rich@cygnus> | 1993-09-08 21:23:41 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1993-09-08 21:23:41 +0000 |
commit | 72cd0384f2eb86970fa0b0415571c23867e5940d (patch) | |
tree | 5539f0cb33ac83d25ed7af96264f81f0e1aa266d | |
parent | 6406a867406328c074e0991ab96f0e6a7ff3a727 (diff) | |
download | gdb-72cd0384f2eb86970fa0b0415571c23867e5940d.zip gdb-72cd0384f2eb86970fa0b0415571c23867e5940d.tar.gz gdb-72cd0384f2eb86970fa0b0415571c23867e5940d.tar.bz2 |
gcc lint
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/c-exp.y | 2 | ||||
-rw-r--r-- | gdb/c-typeprint.c | 2 | ||||
-rw-r--r-- | gdb/c-valprint.c | 1 | ||||
-rw-r--r-- | gdb/ch-valprint.c | 1 | ||||
-rw-r--r-- | gdb/cp-valprint.c | 4 |
6 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ea36b0..e77cdba 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,14 @@ Wed Sep 8 13:01:10 1993 K. Richard Pixley (rich@cygnus.com) Gcc lint. + * c-exp.y (parse_number): initialize i. + * c-typeprint.c (c_type_print_varspec_prefix): include + TYPE_CODE_BITSTRING in switch statements and do nothing. + * c-valprint.c (c_val_print): removed unused variable c. + * ch-valprint.c (chill_val_print): removed unused variable eltlen. + * cp-valprint.c (cp_print_class_method): initialize f & j. + * eval.c (evaluate_subexp): initialize pc2, arg1, arg2. + * expprint.c (print_subexp): initialize myprec, assoc, & tempstr. * findvar.c (value_from_register): initialize first_addr. * gdbtypes.c (lookup_struct_elt_type): localize use of temporary variable typename. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index edfa63e..d3351e8 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -971,7 +971,7 @@ parse_number (p, len, parsed_float, putithere) { register LONGEST n = 0; register LONGEST prevn = 0; - register int i; + register int i = 0; register int c; register int base = input_radix; int unsigned_p = 0; diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 31cb0c4..c51e607 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -306,6 +306,7 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr) case TYPE_CODE_SET: case TYPE_CODE_RANGE: case TYPE_CODE_STRING: + case TYPE_CODE_BITSTRING: /* These types need no prefix. They are listed here so that gcc -Wall will reveal any types that haven't been handled. */ break; @@ -429,6 +430,7 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args) case TYPE_CODE_SET: case TYPE_CODE_RANGE: case TYPE_CODE_STRING: + case TYPE_CODE_BITSTRING: /* These types do not need a suffix. They are listed so that gcc -Wall will report types that may not have been considered. */ break; diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index f50432d..c6de17b 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -94,7 +94,6 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse, struct type *elttype; unsigned eltlen; LONGEST val; - unsigned char c; CORE_ADDR addr; switch (TYPE_CODE (type)) diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c index 23891e8..873da1b 100644 --- a/gdb/ch-valprint.c +++ b/gdb/ch-valprint.c @@ -60,7 +60,6 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse, LONGEST val; unsigned int i = 0; /* Number of characters printed. */ struct type *elttype; - unsigned eltlen; CORE_ADDR addr; switch (TYPE_CODE (type)) diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index bde5879..f5cb15e 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -68,8 +68,8 @@ cp_print_class_method (valaddr, type, stream) FILE *stream; { struct type *domain; - struct fn_field *f; - int j; + struct fn_field *f = NULL; + int j = 0; int len2; int offset; char *kind = ""; |