Fix -Wstrict-aliasing compiler warnings

This commit is contained in:
Miroslav Lichvar 2013-01-03 18:31:33 +01:00
parent 19d162a16b
commit 17735836ef
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff -up wavpack-4.60.1/cli/md5.c.strict_aliasing wavpack-4.60.1/cli/md5.c
--- wavpack-4.60.1/cli/md5.c.strict_aliasing 2009-12-01 05:24:52.000000000 +0100
+++ wavpack-4.60.1/cli/md5.c 2013-01-03 18:38:00.647181420 +0100
@@ -151,8 +151,7 @@ void MD5Final(digest, ctx)
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((uint32 *) ctx->in)[14] = ctx->bits[0];
- ((uint32 *) ctx->in)[15] = ctx->bits[1];
+ memcpy(ctx->in + 14 * sizeof (uint32), ctx->bits, 2 * sizeof (uint32));
MD5Transform(ctx->buf, (uint32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);

View File

@ -1,12 +1,13 @@
Name: wavpack
Summary: A completely open audiocodec
Version: 4.60.1
Release: 4%{?dist}
Release: 5%{?dist}
License: BSD
Group: Applications/Multimedia
Url: http://www.wavpack.com/
Source: http://www.wavpack.com/%{name}-%{version}.tar.bz2
Patch1: wavpack-0001-Fixed-default-values-in-pkgconfig-file.patch
Patch2: wavpack-strict-aliasing.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -28,6 +29,7 @@ Files needed for developing apps using wavpack
%prep
%setup -q
%patch1 -p1 -b .pkgconfig_values
%patch2 -p1 -b .strict_aliasing
%build
%configure --disable-static
@ -62,6 +64,9 @@ rm -rf %{buildroot}
%doc ChangeLog README doc/*
%changelog
* Thu Jan 3 2013 Miroslav Lichvar <mlichvar@redhat.com> 4.60.1-5
- Fix -Wstrict-aliasing compiler warnings
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.60.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild