Skip to content

Commit

Permalink
Fix/disable annoying Visual C++ level 4 warnings.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed May 8, 2008
1 parent 5419451 commit a874f28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mojoshader.c
Expand Up @@ -57,6 +57,9 @@ typedef unsigned int uint; // this is a printf() helper. don't use for code.
typedef unsigned __int8 uint8;
typedef unsigned __int32 uint32;
typedef unsigned __int32 int32;
// Warning Level 4 considered harmful. :)
#pragma warning(disable: 4100) // "unreferenced formal parameter"
#pragma warning(disable: 4389) // "signed/unsigned mismatch"
#else
#include <stdint.h>
typedef uint8_t uint8;
Expand Down
9 changes: 8 additions & 1 deletion mojoshader_opengl.c
Expand Up @@ -32,6 +32,9 @@ typedef unsigned int uint; // this is a printf() helper. don't use for code.
typedef unsigned __int8 uint8;
typedef unsigned __int32 uint32;
typedef unsigned __int32 int32;
// Warning Level 4 considered harmful. :)
#pragma warning(disable: 4100) // "unreferenced formal parameter"
#pragma warning(disable: 4389) // "signed/unsigned mismatch"
#else
#include <stdint.h>
typedef uint8_t uint8;
Expand Down Expand Up @@ -324,7 +327,11 @@ static int valid_profile(const char *profile)
#define MUST_HAVE(p, x) \
if (!ctx->have_##x) { set_error(#p " profile needs " #x); return 0; }

if (0) {}
if (profile == NULL)
{
set_error("NULL profile");
return 0;
} // if

#if SUPPORT_PROFILE_GLSL
else if (strcmp(profile, MOJOSHADER_PROFILE_GLSL) == 0)
Expand Down

0 comments on commit a874f28

Please sign in to comment.