[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
Fri Dec 21 14:07:21 PST 2018

phosek created this revision.
phosek added reviewers: ldionne, EricWF, mclow.lists.
Herald added subscribers: libcxx-commits, christof.

When catopen is missing, do_open, do_get and do_close end up being
no-op, and as such their parameters will be unused which triggers a
warning when building with -Wunused-parameter.

  rCXX libc++



Index: libcxx/include/locale
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -3560,7 +3560,11 @@
 template <class _CharT>
 typename messages<_CharT>::catalog
 messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
+messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
     catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
@@ -3574,8 +3578,12 @@
 template <class _CharT>
 typename messages<_CharT>::string_type
 messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
                          const string_type& __dflt) const
+messages<_CharT>::do_get(catalog, int, int, const string_type& __dflt) const
     string __ndflt;
@@ -3597,7 +3605,11 @@
 template <class _CharT>
 messages<_CharT>::do_close(catalog __c) const
+messages<_CharT>::do_close(catalog) const
     if (__c != -1)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56023.179351.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181221/a61074b4/attachment-0001.bin>

More information about the libcxx-commits mailing list