Skip to content

Commit dad93ab

Browse files
committed
REXM: Ignore some warnings on GCC/Clang
1 parent 5e8118d commit dad93ab

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/rexm/rexm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@
7272
// Create local commit with changes on example renaming
7373
//#define RENAME_AUTO_COMMIT_CREATION
7474

75+
#if defined(__GNUC__) // GCC and Clang
76+
#pragma GCC diagnostic push
77+
// Avoid GCC/Clang complaining about sprintf() second parameter not being a string literal (being TextFormat())
78+
#pragma GCC diagnostic ignored "-Wformat-security"
79+
#endif
80+
7581
//----------------------------------------------------------------------------------
7682
// Types and Structures Definition
7783
//----------------------------------------------------------------------------------
@@ -2917,3 +2923,6 @@ static bool TextInList(const char *text, const char **list, int listCount)
29172923
return result;
29182924
}
29192925

2926+
#if defined(__GNUC__) // GCC and Clang
2927+
#pragma GCC diagnostic pop
2928+
#endif

0 commit comments

Comments
 (0)