aboutsummaryrefslogtreecommitdiff
path: root/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/input.output/file.streams/c.files/cstdio.pass.cpp')
-rw-r--r--test/std/input.output/file.streams/c.files/cstdio.pass.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
index a06f0443d701..4c2be7d4aa9e 100644
--- a/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
+++ b/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
@@ -78,17 +78,24 @@
#include <cstdarg>
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-zero-length"
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
int main()
{
std::FILE* fp = 0;
- std::fpos_t fpos = {0};
+ std::fpos_t fpos = {};
std::size_t s = 0;
char* cp = 0;
std::va_list va;
+ ((void)fp); // Prevent unused warning
+ ((void)fpos); // Prevent unused warning
+ ((void)s); // Prevent unused warning
+ ((void)cp); // Prevent unused warning
+ ((void)va); // Prevent unused warning
static_assert((std::is_same<decltype(std::fclose(fp)), int>::value), "");
static_assert((std::is_same<decltype(std::fflush(fp)), int>::value), "");
static_assert((std::is_same<decltype(std::setbuf(fp,cp)), void>::value), "");