diff --git a/gccwarns.diff b/gccwarns.diff new file mode 100644 index 0000000..3d35c98 --- /dev/null +++ b/gccwarns.diff @@ -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 + #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; diff --git a/schily.changes b/schily.changes index 052d966..6ea619d 100644 --- a/schily.changes +++ b/schily.changes @@ -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 diff --git a/schily.spec b/schily.spec index 0dc7a1e..496ed8c 100644 --- a/schily.spec +++ b/schily.spec @@ -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