Skip to content

Commit

Permalink
t_sprintf_s: supress -Wformat
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Dec 27, 2024
1 parent dab5f74 commit 952d531
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_sprintf_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,14 @@ int test_sprintf_s(void) {
EXPNSTR(str2, "0")
else
EXPSTR(str2, "0")
// invalid length. -Wformat
// invalid length
GCC_DIAG_IGNORE(-Wformat)
#ifdef HAVE_STDDEF_H
rc = sprintf_s(str2, LEN, "%t", pd);
#else
rc = sprintf_s(str2, LEN, "%t", str2 - str1);
#endif
GCC_DIAG_RESTORE
ERR(-1)
}
#endif
Expand Down

0 comments on commit 952d531

Please sign in to comment.