SHA256
1
0
forked from pool/schily

- Add gccwarns.diff to address some undefined behavior.

OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=15
This commit is contained in:
Jan Engelhardt 2018-05-16 14:03:54 +00:00 committed by Git OBS Bridge
parent 05d931e0f0
commit 14326decbf
3 changed files with 42 additions and 1 deletions

35
gccwarns.diff Normal file
View File

@ -0,0 +1,35 @@
[ 191s] searchinpath.c: In function 'searchonefile':
[ 191s] searchinpath.c:221:5: warning: implicit declaration of function 'eaccess'; did you mean 'access'? [-Wimplicit-function-declaration]
[ 191s] (eaccess(nbuf, mode) >= 0)) {
[ 836s] create.c: In function 'flush_link':
[ 836s] create.c:1099:16: warning: 'finfo.f_flags' is used uninitialized in this function [-Wuninitialized]
[ 836s] finfo.f_flags &= ~F_TCB_BUF;
---
libschily/searchinpath.c | 1 +
star/create.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Index: schily-2018-03-16/libschily/searchinpath.c
===================================================================
--- schily-2018-03-16.orig/libschily/searchinpath.c
+++ schily-2018-03-16/libschily/searchinpath.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE 1 /* eaccess */
/* @(#)searchinpath.c 1.6 18/02/04 Copyright 1999-2018 J. Schilling */
#include <schily/mconfig.h>
#ifndef lint
Index: schily-2018-03-16/star/create.c
===================================================================
--- schily-2018-03-16.orig/star/create.c
+++ schily-2018-03-16/star/create.c
@@ -1090,7 +1090,7 @@ flush_link(lp)
{
TCB tb;
TCB *ptb;
- FINFO finfo;
+ FINFO finfo = {};
register LNAME *ln;
int fd = 1;
BOOL did_stat;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 16 13:50:57 UTC 2018 - jengelh@inai.de
- Add gccwarns.diff to address some undefined behavior.
-------------------------------------------------------------------
Mon May 14 09:28:34 UTC 2018 - jengelh@inai.de

View File

@ -33,6 +33,7 @@ Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2
Patch1: gcc48wa.diff
Patch2: mkisofs-j-crash.diff
Patch3: iconv-name.diff
Patch4: gccwarns.diff
# Honor https://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Upstream_policy
# and submit patches upstream FIRST (cc to the bspkg maintainer perhaps).
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -396,7 +397,7 @@ Features:
%prep
%setup -qn %name-%rver
%patch -P 1 -P 2 -P 3 -p1
%patch -P 1 -P 2 -P 3 -P 4 -p1
find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+"
%build