[glibmm/glibmm-2-54] Glib::Variant: Avoid warnings from clang++
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-54] Glib::Variant: Avoid warnings from clang++
- Date: Tue, 19 Sep 2017 07:53:12 +0000 (UTC)
commit 7f5065a7de446563f303fbbdb5d28a710403c23f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Sep 19 09:51:09 2017 +0200
Glib::Variant: Avoid warnings from clang++
Bug 787648
glib/src/variant.ccg | 2 +-
glib/src/variant.hg | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index a645143..856fe46 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -253,7 +253,7 @@ _DEPRECATE_IFDEF_END
VariantBase::operator bool() const
{
- return gobj() ? GINT_TO_POINTER(1) : nullptr;
+ return gobj() != nullptr;
}
void
diff --git a/glib/src/variant.hg b/glib/src/variant.hg
index f4503e2..4fe5719 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -1624,9 +1624,8 @@ namespace detail
{
// swallows any argument
template <class T>
-constexpr int any_arg(T&& arg)
+constexpr int any_arg(T&& /* arg */)
{
- (void)arg;
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]