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()).
diff --git a/loader/loader_platform.h b/loader/loader_platform.h
index 0ff9671..e567700 100644
--- a/loader/loader_platform.h
+++ b/loader/loader_platform.h
@@ -167,7 +167,8 @@
// 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 @@
next++;
}
}
+ // We shouldn't get to here, but this makes the compiler happy:
+ return current;
}
// Dynamic Loading: