summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/input.output/file.streams
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-05-02 19:15:48 +0000
committerEric Fiselier <eric@efcs.ca>2016-05-02 19:15:48 +0000
commitfb42f4c44adc1e2ac25c1305e77d53e735012b77 (patch)
tree1b7284c381b8626e94578527a76c00071d9f9bce /libcxx/test/std/input.output/file.streams
parent9d91336a839d291ea52e91401e9bd92f4dfc5b5a (diff)
downloadbcm5719-llvm-fb42f4c44adc1e2ac25c1305e77d53e735012b77.tar.gz
bcm5719-llvm-fb42f4c44adc1e2ac25c1305e77d53e735012b77.zip
Void cast runtime-unused variables. Patch from STL@microsoft.com
llvm-svn: 268284
Diffstat (limited to 'libcxx/test/std/input.output/file.streams')
-rw-r--r--libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
index 56beb58c3a3..c42e205fd35 100644
--- a/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/c.files/cstdio.pass.cpp
@@ -91,6 +91,11 @@ int main()
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), "");
OpenPOWER on IntegriCloud