diff options
Diffstat (limited to 'test/std/depr/depr.c.headers/stdio_h.pass.cpp')
-rw-r--r-- | test/std/depr/depr.c.headers/stdio_h.pass.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/std/depr/depr.c.headers/stdio_h.pass.cpp b/test/std/depr/depr.c.headers/stdio_h.pass.cpp index 3c5dd0ebf0e0..85f9d2986284 100644 --- a/test/std/depr/depr.c.headers/stdio_h.pass.cpp +++ b/test/std/depr/depr.c.headers/stdio_h.pass.cpp @@ -99,17 +99,25 @@ #include <cstdarg> +#if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wformat-zero-length" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for tmpnam +#endif int main() { FILE* fp = 0; - fpos_t fpos = {0}; - size_t s = 0; ((void)s); + fpos_t fpos = {}; + size_t s = 0; char* cp = 0; char arr[] = {'a', 'b'}; va_list va; + ((void)fp); // Prevent unused warning + ((void)fpos); // Prevent unused warning + ((void)s); // Prevent unused warning + ((void)cp); // Prevent unused warning + ((void)arr); // Prevent unused warning + ((void)va); // Prevent unused warning static_assert((std::is_same<decltype(remove("")), int>::value), ""); static_assert((std::is_same<decltype(rename("","")), int>::value), ""); static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); |