diff options
| author | Ian Elliott <ian@LunarG.com> | 2015-02-04 12:06:46 -0700 |
|---|---|---|
| committer | Ian Elliott <ian@lunarg.com> | 2015-02-05 11:06:32 -0700 |
| commit | 988c35fb30c2158ce81ef76483a3e5e6e7a9a57d (patch) | |
| tree | 75521fd719a2d3cdfe5a5e5b696d4f0552650321 /loader/loader_platform.h | |
| parent | 9f2ae974752208211166a8983f8425be8ac2fffa (diff) | |
| download | usermoji-988c35fb30c2158ce81ef76483a3e5e6e7a9a57d.tar.xz | |
Win: Eliminate VS2013 compiler warnings for "loader.c" ...
As part of this, eliminated some similar warnings within/across usage of
"loader_platform.h". One of these is #define'ing _CRT_SECURE_NO_WARNINGS, so
that VisualStudio won't issue warnings with our use of _snprint() (which they
don't consider secure enough; but their desired function doesn't match the
signature of snprintf()).
Diffstat (limited to 'loader/loader_platform.h')
| -rw-r--r-- | loader/loader_platform.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/loader/loader_platform.h b/loader/loader_platform.h index 0ff9671d..e567700b 100644 --- a/loader/loader_platform.h +++ b/loader/loader_platform.h @@ -167,7 +167,8 @@ using namespace std; // C99: // Microsoft didn't implement C99 in Visual Studio; but started adding it with // VS2013. However, VS2013 still didn't have snprintf(). The following is a -// work-around. +// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the +// "CMakeLists.txt" file). #define snprintf _snprintf #define STATIC_INLINE static // Microsoft also doesn't have basename(). Paths are different on Windows, and @@ -192,6 +193,8 @@ static char *basename(char *pathname) next++; } } + // We shouldn't get to here, but this makes the compiler happy: + return current; } // Dynamic Loading: |
