diff --git a/mps/code/eventcnv.c b/mps/code/eventcnv.c index afec12c6b64..efc601c6507 100644 --- a/mps/code/eventcnv.c +++ b/mps/code/eventcnv.c @@ -24,6 +24,13 @@ #include "ossu.h" #endif +#ifdef MPS_BUILD_MV +/* MSVC warning 4996 = stdio / C runtime 'unsafe' */ +/* Objects to: strncpy, sscanf, fopen. See job001934. */ +#pragma warning( disable : 4996 ) +#endif + + typedef unsigned int uint; typedef unsigned long ulong; diff --git a/mps/code/mpsioan.c b/mps/code/mpsioan.c index dd0345c51e9..bd19b922056 100644 --- a/mps/code/mpsioan.c +++ b/mps/code/mpsioan.c @@ -35,7 +35,11 @@ extern int _flsbuf(unsigned char c, FILE *stream); static FILE *ioFile = NULL; +#ifdef MPS_BUILD_MV +/* MSVC warning 4996 = stdio / C runtime 'unsafe' */ +/* Objects to: fopen. See job001934. */ #pragma warning( disable : 4996 ) +#endif mps_res_t mps_io_create(mps_io_t *mps_io_r) { diff --git a/mps/code/mpsliban.c b/mps/code/mpsliban.c index b03248957b6..581b7a905b4 100644 --- a/mps/code/mpsliban.c +++ b/mps/code/mpsliban.c @@ -118,7 +118,11 @@ mps_clock_t mps_clocks_per_sec(void) } +#ifdef MPS_BUILD_MV +/* MSVC warning 4996 = stdio / C runtime 'unsafe' */ +/* Objects to: getenv. See job001934. */ #pragma warning( disable : 4996 ) +#endif unsigned long mps_lib_telemetry_control(void) { diff --git a/mps/code/testlib.c b/mps/code/testlib.c index 5a1941ab30c..b22ed52bd2c 100644 --- a/mps/code/testlib.c +++ b/mps/code/testlib.c @@ -18,14 +18,17 @@ struct itimerspec; /* stop complaints from time.h */ #endif #include -#ifdef MPS_OS_W3 -#ifdef _MSC_VER -#pragma warning(disable: 4702) /* unreachable code */ - /* job000605: believed needed to prevent VC7 warning - * for error() below, in which va_end is mandated by - * ISO C (C99:7.15.1) even though it is unreachable. - */ -#endif +#ifdef MPS_BUILD_MV +/* MSVC warning 4702 = unreachable code + * + * job000605: believed needed to prevent VC7 warning + * for error() below, in which va_end is mandated by + * ISO C (C99:7.15.1) even though it is unreachable. + */ +#pragma warning(disable: 4702) +/* MSVC warning 4996 = stdio / C runtime 'unsafe' */ +/* Objects to: sscanf. See job001934. */ +#pragma warning( disable : 4996 ) #endif @@ -70,9 +73,6 @@ mps_addr_t rnd_addr(void) /* randomize -- randomize the generator, or initialize to replay */ -/* for sscanf */ -#pragma warning( disable : 4996 ) - void randomize(int argc, char **argv) { int i, k, n;