summaryrefslogtreecommitdiffstats
path: root/libcxx/include/locale
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-01-13 22:15:37 +0000
committerPetr Hosek <phosek@chromium.org>2019-01-13 22:15:37 +0000
commit2fefe153dd93b52bbaf5628958dfac929088452f (patch)
tree306e9fc4dee54794bd875f4d2081146374173c80 /libcxx/include/locale
parent56ba1db933ea7fc3e993c31fce176bbf8578a64c (diff)
downloadbcm5719-llvm-2fefe153dd93b52bbaf5628958dfac929088452f.tar.gz
bcm5719-llvm-2fefe153dd93b52bbaf5628958dfac929088452f.zip
[libcxx] Mark do_open, do_get and do_close parameters unused when catopen is missing
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/error when building with -Wunused-parameter. Differential Revision: https://reviews.llvm.org/D56023 llvm-svn: 351027
Diffstat (limited to 'libcxx/include/locale')
-rw-r--r--libcxx/include/locale6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/locale b/libcxx/include/locale
index ac589d36043..2043892fa2d 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -3568,6 +3568,7 @@ messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
__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,9 @@ messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
__n, __n + strlen(__n));
return __w;
#else // !_LIBCPP_HAS_CATOPEN
+ _LIBCPP_UNUSED_VAR(__c);
+ _LIBCPP_UNUSED_VAR(__set);
+ _LIBCPP_UNUSED_VAR(__msgid);
return __dflt;
#endif // _LIBCPP_HAS_CATOPEN
}
@@ -3604,6 +3608,8 @@ messages<_CharT>::do_close(catalog __c) const
__c <<= 1;
nl_catd __cat = (nl_catd)__c;
catclose(__cat);
+#else // !_LIBCPP_HAS_CATOPEN
+ _LIBCPP_UNUSED_VAR(__c);
#endif // _LIBCPP_HAS_CATOPEN
}
OpenPOWER on IntegriCloud