cmake: avoid "zero-length gnu_printf format string" warning in gcc 6.1.1

Contributed-by: Andy Gibbs <andyg1001@hotmail.co.uk>
llvm-svn: 284302
This commit is contained in:
Tobias Grosser 2016-10-15 05:08:12 +00:00
parent 9a4b10a56f
commit 4b5e24df9a

View File

@ -123,12 +123,12 @@ endif ()
check_c_source_compiles_numeric("
#include <stdio.h>
int main() { snprintf((void*)0, 0, \"\"); return 0; }
int main() { snprintf((void*)0, 0, \" \"); return 0; }
" HAVE_DECL_SNPRINTF)
check_c_source_compiles_numeric("
#include <stdio.h>
int main() { _snprintf((void*)0, 0, \"\"); return 0; }
int main() { _snprintf((void*)0, 0, \" \"); return 0; }
" HAVE_DECL__SNPRINTF)
if (NOT HAVE_DECL_SNPRINTF AND NOT HAVE_DECL__SNPRINTF)