changeset 2041:493d79ea50a8

Fix uninitialized value warnings (not possible in practice, but gcc moans anyway.)
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 30 Nov 2018 06:52:32 +0200
parents 3a7ce77c7f2d
children 45d9db50d996
files tools/fanalyze.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/fanalyze.c	Fri Nov 30 06:51:57 2018 +0200
+++ b/tools/fanalyze.c	Fri Nov 30 06:52:32 2018 +0200
@@ -340,8 +340,11 @@
 {
     Uint8 *data = file->data + offs;
     if (offs + dmGrepTypes[type].bsize >= file->size)
+    {
+        *mval = 0;
         return FALSE;
-    
+    }
+
     switch (type)
     {
         case DMGV_uint8:
@@ -365,6 +368,7 @@
             break;
 
         default:
+            *mval = 0;
             return FALSE;
     }
     return TRUE;