Skip to content

Commit

Permalink
Static analysis fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 7, 2014
1 parent 4cf5176 commit 449a83e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mojoshader_opengl.c
Expand Up @@ -285,13 +285,21 @@ static inline int macosx_version_atleast(int x, int y, int z)

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
Expand Down

0 comments on commit 449a83e

Please sign in to comment.