ncompress: silence gcc warnings

Version: 4.2.4.4-1
This commit is contained in:
Pavel Raiskup 2013-03-03 11:41:56 +01:00
parent 7afa59d655
commit bd019c1376
2 changed files with 39 additions and 0 deletions

View File

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

View File

@ -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@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@lists.fedoraproject.org> - 4.2.4-59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild