[PATCH] D56023: [libcxx] Mark do_open, do_get and do_close parameters unused when catopen is missing

Petr Hosek via Phabricator reviews at reviews.llvm.org
Thu Dec 27 22:26:53 PST 2018


phosek updated this revision to Diff 179605.
phosek marked an inline comment as done.

Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56023/new/

https://reviews.llvm.org/D56023

Files:
  libcxx/include/__config
  libcxx/include/locale


Index: libcxx/include/locale
===================================================================
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -3568,6 +3568,7 @@
         __cat = static_cast<catalog>((static_cast<size_t>(__cat) >> 1));
     return __cat;
 #else // !_LIBCPP_HAS_CATOPEN
+    _LIBCPP_UNUSED_VAR(__nm);
     return -1;
 #endif // _LIBCPP_HAS_CATOPEN
 }
@@ -3591,6 +3592,10 @@
                                                         __n, __n + strlen(__n));
     return __w;
 #else // !_LIBCPP_HAS_CATOPEN
+    _LIBCPP_UNUSED_VAR(__c);
+    _LIBCPP_UNUSED_VAR(__set);
+    _LIBCPP_UNUSED_VAR(__msgid);
+    _LIBCPP_UNUSED_VAR(__dflt);
     return __dflt;
 #endif // _LIBCPP_HAS_CATOPEN
 }
@@ -3604,6 +3609,8 @@
         __c <<= 1;
     nl_catd __cat = (nl_catd)__c;
     catclose(__cat);
+#else // !_LIBCPP_HAS_CATOPEN
+    _LIBCPP_UNUSED_VAR(__c);
 #endif // _LIBCPP_HAS_CATOPEN
 }
 
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -1424,6 +1424,8 @@
 #  endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
 #endif // _LIBCPP_NO_AUTO_LINK
 
+#define _LIBCPP_UNUSED_VAR(x) ((void)(x))
+
 #endif // __cplusplus
 
 #endif // _LIBCPP_CONFIG


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56023.179605.patch
Type: text/x-patch
Size: 1297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181228/7fa0ba1a/attachment.bin>


More information about the libcxx-commits mailing list