From c102dce615b30d6b75bd86926a8c67ebd8ba970c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 27 Nov 2020 14:01:47 +0100 Subject: [PATCH] Add a patch to fix a compiler warning genrand() returns an int. clang reports an error here. --- genrand-return-value.patch | 12 ++++++++++++ scrub.spec | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 genrand-return-value.patch diff --git a/genrand-return-value.patch b/genrand-return-value.patch new file mode 100644 index 0000000..ed79a3e --- /dev/null +++ b/genrand-return-value.patch @@ -0,0 +1,12 @@ +diff -ruN scrub-2.5.2.orig/src/genrand.c scrub-2.5.2/src/genrand.c +--- scrub-2.5.2.orig/src/genrand.c 2012-06-21 00:00:27.000000000 +0200 ++++ scrub-2.5.2/src/genrand.c 2020-11-27 13:57:59.866410480 +0100 +@@ -106,7 +106,7 @@ + buf[n] = result; + } + #endif +- return; ++ return 0; + } + } + diff --git a/scrub.spec b/scrub.spec index e966bec..535f891 100644 --- a/scrub.spec +++ b/scrub.spec @@ -6,6 +6,8 @@ License: GPLv2+ URL: http://code.google.com/p/diskscrub/ Source0: http://diskscrub.googlecode.com/files/%{name}-%{version}.tar.bz2 +Patch0: genrand-return-value.patch + BuildRequires: gcc %description Scrub writes patterns on files or disk devices to make @@ -19,6 +21,8 @@ the file system is full, then scrubbed as in 2). %prep %setup -q +%autopatch -p1 + %build %configure %{make_build}