Add a patch to fix a compiler warning

genrand() returns an int. clang reports an error here.
This commit is contained in:
Timm Bäder 2020-11-27 14:01:47 +01:00
parent 1a1f716e8a
commit c102dce615
2 changed files with 16 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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}