[PATCH] D20918: [libcxx] [test] Silence more "unreferenced local variable" warnings.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 09:38:44 PDT 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

Silence more "unreferenced local variable" warnings.

http://reviews.llvm.org/D20918

Files:
  test/std/depr/depr.c.headers/wchar_h.pass.cpp

Index: test/std/depr/depr.c.headers/wchar_h.pass.cpp
===================================================================
--- test/std/depr/depr.c.headers/wchar_h.pass.cpp
+++ test/std/depr/depr.c.headers/wchar_h.pass.cpp
@@ -43,6 +43,14 @@
     ::va_list va;
     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(fwprintf(fp, L"")), int>::value), "");
     static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), "");
     static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), "");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20918.59401.patch
Type: text/x-patch
Size: 887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160602/58fd9cd6/attachment.bin>


More information about the cfe-commits mailing list