From: K. Richard Pixley Date: Wed, 8 Sep 1993 21:23:41 +0000 (+0000) Subject: gcc lint X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72cd0384f2eb86970fa0b0415571c23867e5940d;p=binutils-gdb.git gcc lint --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8ea36b0e70c..e77cdbaf266 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 edfa63ef70a..d3351e87c0c 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 31cb0c4eea7..c51e6078b01 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 f50432d40be..c6de17bb84b 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 23891e88fcc..873da1b53c7 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 bde58797e3b..f5cb15e29c4 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 = "";