From 89ce0c8f50b02eecbb87ad6246299fd214724846 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 10 Nov 1993 15:58:48 +0000 Subject: [PATCH] gcc -Wall lint: * thread.c: Include "gdbcmd.h" and . * Makefile.in: Update dependency. * thread.c (thread_command): Remove unused variable p. * values.c (unpack_double): Use len instead of TYPE_LENGTH (type). * valprint.c (print_floating): Correctly check sign bit now that we are using unsigned arithmetic. * symtab.c (find_pc_line_range): Remove unused variables exact_match, ind, and l. --- gdb/ChangeLog | 12 ++++++++++++ gdb/Makefile.in | 2 +- gdb/symtab.c | 3 --- gdb/thread.c | 3 ++- gdb/values.c | 19 +++++++++++-------- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 859dee66f52..844e0559547 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +Wed Nov 10 09:31:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + gcc -Wall lint: + * thread.c: Include "gdbcmd.h" and . + * Makefile.in: Update dependency. + * thread.c (thread_command): Remove unused variable p. + * values.c (unpack_double): Use len instead of TYPE_LENGTH (type). + * valprint.c (print_floating): Correctly check sign bit now that + we are using unsigned arithmetic. + * symtab.c (find_pc_line_range): Remove unused variables exact_match, + ind, and l. + Tue Nov 9 17:42:25 1993 Kung Hsu (kung@cirdan.cygnus.com) * valarith.c (value_x_binop): fix search operator in class bug diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6a83cfeddea..ac3ee3f4d4e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1401,7 +1401,7 @@ tahoe-pinsn.o: tahoe-pinsn.c $(OP_INCLUDE)/tahoe.h $(defs_h) \ target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \ objfiles.h symfile.h target.h -thread.o: thread.c $(defs_h) thread.h +thread.o: thread.c $(defs_h) thread.h $(gdbcmd_h) typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \ $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \ diff --git a/gdb/symtab.c b/gdb/symtab.c index 582ca04696b..2dcc8777449 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1284,9 +1284,6 @@ find_line_pc_range (sal, startptr, endptr) struct symtab_and_line sal; CORE_ADDR *startptr, *endptr; { - struct linetable *l; - int ind; - int exact_match; /* did we get an exact linenumber match */ CORE_ADDR startaddr; struct symtab_and_line found_sal; diff --git a/gdb/thread.c b/gdb/thread.c index a060beccf7c..c3d52c33b4d 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -29,7 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "target.h" #include "thread.h" #include "command.h" +#include "gdbcmd.h" +#include #include #include @@ -323,7 +325,6 @@ thread_command (tidstr, from_tty) { int num; struct thread_info *tp; - char *p; if (!tidstr) error ("Please specify a thread ID. Use the \"info threads\" command to\n\ diff --git a/gdb/values.c b/gdb/values.c index 494f5bd06da..7191abaa710 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -647,15 +647,18 @@ unpack_double (type, valaddr, invp) *invp = 1; return 1.234567891011121314; } - return extract_floating (valaddr, TYPE_LENGTH (type)); + return extract_floating (valaddr, len); + } + else if (nosign) + { + /* Unsigned -- be sure we compensate for signed LONGEST. */ + return (unsigned LONGEST) unpack_long (type, valaddr); + } + else + { + /* Signed -- we are OK with unpack_long. */ + return unpack_long (type, valaddr); } - else if (nosign) { - /* Unsigned -- be sure we compensate for signed LONGEST. */ - return (unsigned LONGEST) unpack_long (type, valaddr); - } else { - /* Signed -- we are OK with unpack_long. */ - return unpack_long (type, valaddr); - } } /* Unpack raw data (copied from debugee, target byte order) at VALADDR -- 2.30.2