summaryrefslogtreecommitdiff
path: root/test/std/language.support/support.runtime/ctime.pass.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
commit51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch)
tree91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/language.support/support.runtime/ctime.pass.cpp
parentbb5e33f003797b67974a8893f7f2930fc51b8210 (diff)
Notes
Diffstat (limited to 'test/std/language.support/support.runtime/ctime.pass.cpp')
-rw-r--r--test/std/language.support/support.runtime/ctime.pass.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/std/language.support/support.runtime/ctime.pass.cpp b/test/std/language.support/support.runtime/ctime.pass.cpp
index 03a0aa4d6966..34343b247f21 100644
--- a/test/std/language.support/support.runtime/ctime.pass.cpp
+++ b/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};
+ std::tm tm = {};
+ ((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), "");
}