diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-11-10 15:58:48 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-11-10 15:58:48 +0000 |
commit | 89ce0c8f50b02eecbb87ad6246299fd214724846 (patch) | |
tree | 74740b5ad2238c6d62afbed66c688b4c70abb4c7 /gdb/values.c | |
parent | 27ed24c3649226227ff66f8ba53b4966ffd20c86 (diff) | |
download | gdb-89ce0c8f50b02eecbb87ad6246299fd214724846.zip gdb-89ce0c8f50b02eecbb87ad6246299fd214724846.tar.gz gdb-89ce0c8f50b02eecbb87ad6246299fd214724846.tar.bz2 |
gcc -Wall lint:
* thread.c: Include "gdbcmd.h" and <ctype.h>.
* 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.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/values.c b/gdb/values.c index 494f5bd..7191aba 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 |