[ncompress] ncompress: silence gcc warnings
Pavel Raiskup
praiskup at fedoraproject.org
Sun Mar 3 11:20:50 UTC 2013
commit bd019c1376ede16e88dba6a59239c1e799c89fbb
Author: Pavel Raiskup <pavel at raiskup.cz>
Date: Sun Mar 3 11:41:56 2013 +0100
ncompress: silence gcc warnings
Version: 4.2.4.4-1
ncompress-4.2.4.4-silence-gcc.patch | 33 +++++++++++++++++++++++++++++++++
ncompress.spec | 6 ++++++
2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/ncompress-4.2.4.4-silence-gcc.patch b/ncompress-4.2.4.4-silence-gcc.patch
new file mode 100644
index 0000000..738ce80
--- /dev/null
+++ b/ncompress-4.2.4.4-silence-gcc.patch
@@ -0,0 +1,33 @@
+diff --git a/compress42.c b/compress42.c
+index c3f6b35..834c2f2 100644
+--- a/compress42.c
++++ b/compress42.c
+@@ -704,7 +704,7 @@ main(argc, argv)
+ REG4 char **fileptr;
+ int i;
+
+- if (fgnd_flag = (signal(SIGINT, SIG_IGN) != SIG_IGN))
++ if ((fgnd_flag = (signal(SIGINT, SIG_IGN)) != SIG_IGN))
+ signal(SIGINT, (SIG_TYPE)abort_compress);
+
+ signal(SIGTERM, (SIG_TYPE)abort_compress);
+@@ -1016,8 +1016,8 @@ comprexx(fileptr)
+
+ if (infstat.st_nlink > 1 && (!force))
+ {
+- fprintf(stderr, "%s has %d other links: unchanged\n",
+- tempname, infstat.st_nlink - 1);
++ fprintf(stderr, "%s has %ld other links: unchanged\n",
++ tempname, (long)(infstat.st_nlink - 1));
+ exit_code = 1;
+ return;
+ }
+@@ -1318,7 +1318,7 @@ compdir(dir)
+ ** think it's worth it. -- Dave Mack
+ */
+
+- while (dp = readdir(dirp))
++ while ((dp = readdir(dirp)))
+ {
+ if (dp->d_ino == 0)
+ continue;
diff --git a/ncompress.spec b/ncompress.spec
index f881013..6c668aa 100644
--- a/ncompress.spec
+++ b/ncompress.spec
@@ -34,6 +34,10 @@ Patch4: ncompress-4.2.4.4-endians.patch
# ~> downstream
Patch5: ncompress-4.2.4.4-memmove.patch
+# silence gcc warnings
+# ~> downstream
+Patch6: ncompress-4.2.4.4-silence-gcc.patch
+
BuildRequires: gcc glibc-devel fileutils
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -69,6 +73,7 @@ sed "s/\$(ARCH_FLAGS)/$ARCH_FLAGS/" Makefile.def > Makefile
%patch3 -p1 -b .2GB
%patch4 -p1 -b .endians
%patch5 -p1 -b .memmove
+%patch6 -p1 -b .silence-gcc
%build
make CFLAGS="%{optflags} %{?nc_endian} %{?nc_align}"
@@ -95,6 +100,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Mar 01 2013 Pavel Raiskup <praiskup at redhat.com> - 4.2.4.4-1
- upstream is dead -> rebase to fork of Mike Frysinger
+- silence gcc warnings
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.2.4-59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list