Skip to content

Commit 475b18c

Browse files
author
Johann Anhofer
committed
Fix warnings if YYJSON_MSC_VER doesn't exist
1 parent f965beb commit 475b18c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/jsoncons/config/compiler_support.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393

394394
/** noinline for compiler */
395395
#ifndef JSONCONS_NOINLINE
396-
# if YYJSON_MSC_VER >= 1400
396+
# if defined(YYJSON_MSC_VER) && YYJSON_MSC_VER >= 1400
397397
# define JSONCONS_NOINLINE __declspec(noinline)
398398
# elif JSONCONS_HAS_ATTRIBUTE(noinline) || YYJSON_GCC_VER >= 4
399399
# define JSONCONS_NOINLINE __attribute__((noinline))
@@ -404,7 +404,7 @@
404404

405405
/** align for compiler */
406406
#ifndef JSONCONS_ALIGN
407-
# if YYJSON_MSC_VER >= 1300
407+
# if defined(YYJSON_MSC_VER) && YYJSON_MSC_VER >= 1300
408408
# define JSONCONS_ALIGN(x) __declspec(align(x))
409409
# elif JSONCONS_HAS_ATTRIBUTE(aligned) || defined(__GNUC__)
410410
# define JSONCONS_ALIGN(x) __attribute__((aligned(x)))

0 commit comments

Comments
 (0)