Accepting request 358730 from home:rguenther:branches:Archiving

- Add lzop-1.03-gcc6.patch to fix undefined behavior in its ACC test
  uncovered by GCC 6.

OBS-URL: https://build.opensuse.org/request/show/358730
OBS-URL: https://build.opensuse.org/package/show/Archiving/lzop?expand=0&rev=15
This commit is contained in:
Martin Pluskal 2016-02-10 16:25:29 +00:00 committed by Git OBS Bridge
parent 73f9ed7494
commit fc0276e3f8
3 changed files with 35 additions and 1 deletions

26
lzop-1.03-gcc6.patch Normal file
View File

@ -0,0 +1,26 @@
--- src/miniacc.h.orig 2016-02-10 16:09:23.247315866 +0100
+++ src/miniacc.h 2016-02-10 16:12:14.973297054 +0100
@@ -4469,12 +4469,12 @@
#if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
#elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
#else
- ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0)
+ ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0)
#endif
ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0)
#if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
#else
- ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0)
+ ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0)
#endif
ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
#if defined(acc_int16e_t)
@@ -4703,7 +4703,7 @@
#elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
#elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
#elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
- ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
+ ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
#endif
#if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
# pragma option pop

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 10 15:14:14 UTC 2016 - rguenther@suse.com
- Add lzop-1.03-gcc6.patch to fix undefined behavior in its ACC test
uncovered by GCC 6.
-------------------------------------------------------------------
Fri Mar 13 13:06:40 UTC 2015 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package lzop
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,6 +25,7 @@ Group: Productivity/Archiving/Compression
Url: http://www.lzop.org
Source0: http://www.lzop.org/download/%{name}-%{version}.tar.gz
Source1: %{name}.changes
Patch: lzop-1.03-gcc6.patch
BuildRequires: lzo-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -40,6 +41,7 @@ lzop was designed with the following goals in mind:
%prep
%setup -q
%patch
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE1}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""