]> granicus.if.org Git - yasm/commitdiff
Splint cleanups.
authorPeter Johnson <peter@tortall.net>
Mon, 22 Apr 2002 01:58:09 +0000 (01:58 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 22 Apr 2002 01:58:09 +0000 (01:58 -0000)
svn path=/trunk/yasm/; revision=598

libyasm/floatnum.c
src/floatnum.c

index 5faef0dfb6c01f36c48596d51ae51fa2460faa4f..9f4e936b41274ede3ba7ecc72b25300f5619ff1a 100644 (file)
@@ -155,7 +155,8 @@ POT_Table_Init_Entry(/*@out@*/ POT_Entry *e, POT_Entry_Source *s, int dec_exp)
 /*@-compdef@*/
 static void
 POT_Table_Init(void)
-/*@globals undef POT_TableN, undef POT_TableP @*/
+/*@globals undef POT_TableN, undef POT_TableP, POT_TableP_Source,
+   POT_TableN_Source @*/
 {
     int dec_exp = 1;
     int i;
@@ -523,8 +524,10 @@ floatnum_get_int(const floatnum *flt, unsigned long *ret_val)
 {
     unsigned char t[4];
 
-    if (floatnum_get_sized(flt, t, 4))
+    if (floatnum_get_sized(flt, t, 4)) {
+       *ret_val = 0xDEADBEEFUL;    /* Obviously incorrect return value */
        return 1;
+    }
 
     LOAD_LONG(*ret_val, &t[0]);
     return 0;
index 5faef0dfb6c01f36c48596d51ae51fa2460faa4f..9f4e936b41274ede3ba7ecc72b25300f5619ff1a 100644 (file)
@@ -155,7 +155,8 @@ POT_Table_Init_Entry(/*@out@*/ POT_Entry *e, POT_Entry_Source *s, int dec_exp)
 /*@-compdef@*/
 static void
 POT_Table_Init(void)
-/*@globals undef POT_TableN, undef POT_TableP @*/
+/*@globals undef POT_TableN, undef POT_TableP, POT_TableP_Source,
+   POT_TableN_Source @*/
 {
     int dec_exp = 1;
     int i;
@@ -523,8 +524,10 @@ floatnum_get_int(const floatnum *flt, unsigned long *ret_val)
 {
     unsigned char t[4];
 
-    if (floatnum_get_sized(flt, t, 4))
+    if (floatnum_get_sized(flt, t, 4)) {
+       *ret_val = 0xDEADBEEFUL;    /* Obviously incorrect return value */
        return 1;
+    }
 
     LOAD_LONG(*ret_val, &t[0]);
     return 0;