diff --git a/cJSON.c b/cJSON.c index 9c86128..e816cde 100644 --- a/cJSON.c +++ b/cJSON.c @@ -31,6 +31,11 @@ #ifdef __GNUC__ #pragma GCC visibility push(default) #endif +#if defined(_MSC_VER) +#pragma warning (push) +/* disable warning about single line comments in system headers */ +#pragma warning (disable : 4001) +#endif #include #include @@ -41,6 +46,9 @@ #include #include +#if defined(_MSC_VER) +#pragma warning (pop) +#endif #ifdef __GNUC__ #pragma GCC visibility pop #endif diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 2baa492..b83cfcd 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -28,11 +28,21 @@ #ifdef __GNUCC__ #pragma GCC visibility push(default) #endif +#if defined(_MSC_VER) +#pragma warning (push) +/* disable warning about single line comments in system headers */ +#pragma warning (disable : 4001) +#endif + #include #include #include #include #include + +#if defined(_MSC_VER) +#pragma warning (pop) +#endif #ifdef __GNUCC__ #pragma GCC visibility pop #endif