aboutsummaryrefslogtreecommitdiff
path: root/gdb/objc-exp.y
diff options
context:
space:
mode:
authorAdam Fedor <fedor@gnu.org>2002-12-31 04:48:32 +0000
committerAdam Fedor <fedor@gnu.org>2002-12-31 04:48:32 +0000
commit7ee21aad7db971f20f2dce387d56b72a5fd889e2 (patch)
tree7efee15b0e4a2225907643ce00f958b68ce98f61 /gdb/objc-exp.y
parent6744810279b30b4ca09347ad9374c86702697bba (diff)
downloadgdb-7ee21aad7db971f20f2dce387d56b72a5fd889e2.zip
gdb-7ee21aad7db971f20f2dce387d56b72a5fd889e2.tar.gz
gdb-7ee21aad7db971f20f2dce387d56b72a5fd889e2.tar.bz2
objc-exp.y (parse_number): Cast sscanf arguments to proper type.
(yylex): Initialize c to avoid uninitialized warning.
Diffstat (limited to 'gdb/objc-exp.y')
-rw-r--r--gdb/objc-exp.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 69eedd6..78f207d 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: