summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/language.support/support.runtime/ctime.pass.cpp')
-rw-r--r--libcxx/test/std/language.support/support.runtime/ctime.pass.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
index 03a0aa4d696..5f294860518 100644
--- a/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/ctime.pass.cpp
@@ -23,10 +23,13 @@
int main()
{
std::clock_t c = 0;
- ((void)c);
std::size_t s = 0;
std::time_t t = 0;
std::tm tm = {0};
+ ((void)c); // Prevent unused warning
+ ((void)s); // Prevent unused warning
+ ((void)t); // Prevent unused warning
+ ((void)tm); // Prevent unused warning
static_assert((std::is_same<decltype(std::clock()), std::clock_t>::value), "");
static_assert((std::is_same<decltype(std::difftime(t,t)), double>::value), "");
static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), "");
@@ -39,5 +42,7 @@ int main()
#endif
char* c1 = 0;
const char* c2 = 0;
+ ((void)c1); // Prevent unused warning
+ ((void)c2); // Prevent unused warning
static_assert((std::is_same<decltype(std::strftime(c1,s,c2,&tm)), std::size_t>::value), "");
}
OpenPOWER on IntegriCloud