new upstream release

drop Patch0, applied in upstream tarball
This commit is contained in:
Björn Esser 2016-03-30 11:24:02 +02:00
parent 1b1dfd1ae3
commit a250036050
3 changed files with 7 additions and 60 deletions

View File

@ -1,53 +0,0 @@
From e49f4dde7351152908aaec18969789377f96f631 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <me@besser82.io>
Date: Wed, 30 Mar 2016 09:12:04 +0200
Subject: [PATCH] Fix 'Werror=nonnull-compare' for GCC 6 See:
https://gcc.gnu.org/gcc-6/porting_to.html
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Optimizations remove null pointer checks for 'this'
…/src/YDialog.cc: In member function 'bool YDialog::destroy(bool)':
…/src/YDialog.cc:254:24: error:
nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
YUI_CHECK_WIDGET( this );
~~~~~~~~~^~~~~~
---
src/YUIException.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/YUIException.h b/src/YUIException.h
index f0dcb21..f87fa8b 100644
--- a/src/YUIException.h
+++ b/src/YUIException.h
@@ -172,11 +172,27 @@ class YWidget;
/**
* Check if a widget pointer is valid.
* Throws YUIInvalidWidgetException if it is 0 or invalid (already deleted).
+ *
+ * Explicitly casting the memory-address stored in the given pointer to
+ * a boolean-type for null-poiter-checks is needed for GCC >= 6, because
+ * it introduces new optimizations to remove null-pointer-checks for 'this'.
+ *
+ * Not explicitly casting the pointer's memory-address, will cause the
+ * compilation to fail with an error, when using this macro in YDialog:
+ *
+ * …/src/YDialog.cc: In member function 'bool YDialog::destroy(bool)':
+ * …/src/YDialog.cc:254:24: error:
+ * nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
+ * YUI_CHECK_WIDGET( this );
+ * ~~~~~~~~~^~~~~~
+ *
+ * See: https://gcc.gnu.org/gcc-6/porting_to.html
**/
#define YUI_CHECK_WIDGET( WIDGET ) \
do \
{ \
- if ( ! (WIDGET) || ! (WIDGET)->isValid() ) \
+ if ( ! ( static_cast<bool> (WIDGET) ) || \
+ ! (WIDGET)->isValid() ) \
{ \
YUI_THROW( YUIInvalidWidgetException() ); \
} \

View File

@ -15,17 +15,14 @@
%global _cmake_build_subdir build-%{?_arch}%{?dist}
Name: lib%{libsuffix}
Version: 3.2.4
Release: 2%{?dist}
Version: 3.2.5
Release: 1%{?dist}
Summary: GUI-abstraction library
License: (LGPLv2 or LGPLv3) and MIT
URL: https://github.com/%{name}/%{name}
Source0: %{url}/archive/%{name}/master/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Submitted upstream: https://github.com/libyui/libyui/pull/97
Patch0000: https://github.com/besser82/libyui/commit/e49f4dde7351152908aaec18969789377f96f631.patch#/%{name}-3.2.4-fix_werror_nonnull_compare_gcc6.patch
BuildRequires: boost-devel
BuildRequires: cmake >= 2.8
@ -72,7 +69,6 @@ brief examples how to build a UI using %{name}.
%prep
%setup -qn %{name}-%{name}-master-%{version}
%patch0000 -p1 -b .nonnull_compare_gcc6
./bootstrap.sh
@ -142,6 +138,10 @@ popd
%changelog
* Wed Mar 30 2016 Björn Esser <fedora@besser82.io> - 3.2.5-1
- new upstream release
- drop Patch0, applied in upstream tarball
* Wed Mar 30 2016 Björn Esser <fedora@besser82.io> - 3.2.4-2
- add Patch0, fix nullptr-checks with GCC6 in YDialog
- do not append '-fno-delete-null-pointer-checks' to %%optflags,

View File

@ -1 +1 @@
16a6e24f48a39d61656b1ce4a75d0f1f libyui-3.2.4.tar.gz
f4495fa955b6ac979314396b8460f710 libyui-3.2.5.tar.gz