Static analysis fix.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 07 Feb 2014 15:57:54 -0500
changeset 1133 eb1eb43987b3
parent 1132 b784577caefa
child 1134 be31bd0ee0a2
Static analysis fix.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Fri May 17 15:01:09 2013 -0400
+++ b/mojoshader_opengl.c	Fri Feb 07 15:57:54 2014 -0500
@@ -285,13 +285,21 @@
 
     if (!checked)
     {
-        SInt32 ver, major, minor, patch;
+        SInt32 ver = 0;
+        SInt32 major = 0;
+        SInt32 minor = 0;
+        SInt32 patch = 0;
         int convert = 0;
 
         if (Gestalt(gestaltSystemVersion, &ver) != noErr)
+        {
             ver = 0x1000;  // oh well.
+            convert = 1;  // split (ver) into (major),(minor),(patch).
+        }
         else if (ver < 0x1030)
+        {
             convert = 1;  // split (ver) into (major),(minor),(patch).
+        }
         else
         {
             // presumably this won't fail. But if it does, we'll just use the