diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-05-02 19:15:48 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-05-02 19:15:48 +0000 |
commit | fb42f4c44adc1e2ac25c1305e77d53e735012b77 (patch) | |
tree | 1b7284c381b8626e94578527a76c00071d9f9bce /libcxx/test/std/strings | |
parent | 9d91336a839d291ea52e91401e9bd92f4dfc5b5a (diff) | |
download | bcm5719-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/strings')
-rw-r--r-- | libcxx/test/std/strings/c.strings/cwchar.pass.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/test/std/strings/c.strings/cwchar.pass.cpp b/libcxx/test/std/strings/c.strings/cwchar.pass.cpp index fc4228237ad..2b7c3c465f6 100644 --- a/libcxx/test/std/strings/c.strings/cwchar.pass.cpp +++ b/libcxx/test/std/strings/c.strings/cwchar.pass.cpp @@ -40,6 +40,16 @@ int main() char* ns = 0; wchar_t* ws = 0; + + ((void)mb); // Prevent unused warning + ((void)s); // Prevent unused warning + ((void)tm); // Prevent unused warning + ((void)w); // Prevent unused warning + ((void)fp); // Prevent unused warning + ((void)va); // Prevent unused warning + ((void)ns); // Prevent unused warning + ((void)ws); // Prevent unused warning + static_assert((std::is_same<decltype(std::fwprintf(fp, L"")), int>::value), ""); static_assert((std::is_same<decltype(std::fwscanf(fp, L"")), int>::value), ""); static_assert((std::is_same<decltype(std::swprintf(ws, s, L"")), int>::value), ""); |