diff options
author | Adam Fedor <fedor@gnu.org> | 2002-12-31 04:48:32 +0000 |
---|---|---|
committer | Adam Fedor <fedor@gnu.org> | 2002-12-31 04:48:32 +0000 |
commit | c1b29a1d2df5436c5f56d294809fd7ead43368d6 (patch) | |
tree | 7d55c366379953daab13b659d2cb52517e5851a8 /gdb | |
parent | 91ff353a0e13fe97e207414379fc440a08769389 (diff) | |
download | gdb-c1b29a1d2df5436c5f56d294809fd7ead43368d6.tar.gz |
objc-exp.y (parse_number): Cast sscanf arguments to proper type.
(yylex): Initialize c to avoid uninitialized warning.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/objc-exp.y | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5fab9d0ce7e..c09467843fe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-12-30 Adam Fedor <fedor@gnu.org> + + * objc-exp.y (parse_number): Cast sscanf arguments to proper type. + (yylex): Initialize c to avoid uninitialized warning. + 2002-12-29 Kazu Hirata <kazu@cs.umass.edu> * doc/fdl.texi: Revert the last change. diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y index 69eedd6e9c0..78f207df15f 100644 --- a/gdb/objc-exp.y +++ b/gdb/objc-exp.y @@ -1022,9 +1022,9 @@ parse_number (p, len, parsed_float, putithere) /* It's a float since it contains a point or an exponent. */ if (sizeof (putithere->typed_val_float.dval) <= sizeof (float)) - sscanf (p, "%g", &putithere->typed_val_float.dval); + sscanf (p, "%g", (float *)&putithere->typed_val_float.dval); else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double)) - sscanf (p, "%lg", &putithere->typed_val_float.dval); + sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval); else { #ifdef PRINTF_HAS_LONG_DOUBLE @@ -1277,6 +1277,7 @@ yylex () return tokentab2[i].token; } + c = 0; switch (tokchr = *tokstart) { case 0: |