We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8401d38 commit e8fd5beCopy full SHA for e8fd5be
1 file changed
source/core_json.c
@@ -1035,7 +1035,15 @@ static void skipScalars( const char * buf,
1035
size_t max,
1036
char mode )
1037
{
1038
- coreJSON_ASSERT( isOpenBracket_( mode ) );
+ bool modeIsOpenBracket = ( bool ) isOpenBracket_( mode );
1039
+
1040
+ /* assert function may be implemented in macro using a # or ## operator.
1041
+ * Using a local variable here to prevent macro replacement is subjected
1042
+ * to macro itself. */
1043
+ coreJSON_ASSERT( modeIsOpenBracket != false );
1044
1045
+ /* Adding this line to avoid unused variable warning in release mode. */
1046
+ ( void ) modeIsOpenBracket;
1047
1048
skipSpace( buf, start, max );
1049
0 commit comments