objc-exp.y (parse_number): Cast sscanf arguments to proper type.
(yylex): Initialize c to avoid uninitialized warning.
This commit is contained in:
parent
6744810279
commit
7ee21aad7d
2 changed files with 8 additions and 2 deletions
|
@ -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>
|
2002-12-29 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
* doc/fdl.texi: Revert the last change.
|
* doc/fdl.texi: Revert the last change.
|
||||||
|
|
|
@ -1022,9 +1022,9 @@ parse_number (p, len, parsed_float, putithere)
|
||||||
/* It's a float since it contains a point or an exponent. */
|
/* It's a float since it contains a point or an exponent. */
|
||||||
|
|
||||||
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
|
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))
|
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
|
else
|
||||||
{
|
{
|
||||||
#ifdef PRINTF_HAS_LONG_DOUBLE
|
#ifdef PRINTF_HAS_LONG_DOUBLE
|
||||||
|
@ -1277,6 +1277,7 @@ yylex ()
|
||||||
return tokentab2[i].token;
|
return tokentab2[i].token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c = 0;
|
||||||
switch (tokchr = *tokstart)
|
switch (tokchr = *tokstart)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Reference in a new issue