[flac-dev] PATCH for cpu.c

Oliver Stöneberg oliverst at online.de
Sat Mar 22 07:18:20 PDT 2014


Hi,

after having some discussion of the FPU/SSE behavior on the sf.net 
bug tracker as well as having some other changes we made for the 
MAME/MESS project sitting around I thought about joining this list to 
make things easier.

First one is the latest modification we had to make to compile with 
clang 3.4 x64. Here are the warnings the 1.2.1 source will give with 
it:

src/lib/libflac/libFLAC/cpu.c:90:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_CMOV' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV = 0x00008000;
                      ^
src/lib/libflac/libFLAC/cpu.c:91:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_MMX' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_MMX = 0x00800000;
                      ^
src/lib/libflac/libFLAC/cpu.c:92:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_FXSR' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_FXSR = 0x01000000;
                      ^
src/lib/libflac/libFLAC/cpu.c:93:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_SSE' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE = 0x02000000;
                      ^
src/lib/libflac/libFLAC/cpu.c:94:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_SSE2' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2 = 0x04000000;
                      ^
src/lib/libflac/libFLAC/cpu.c:96:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_SSE3' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE3 = 0x00000001;
                      ^
src/lib/libflac/libFLAC/cpu.c:97:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_SSSE3' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSSE3 = 0x00000200;
                      ^
src/lib/libflac/libFLAC/cpu.c:99:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_3DNOW' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_3DNOW = 0x80000000;
                      ^
src/lib/libflac/libFLAC/cpu.c:100:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXT3DNOW' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXT3DNOW = 0x40000000;
                      ^
src/lib/libflac/libFLAC/cpu.c:101:23: error: unused variable 'FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX' [-Werror,-Wunused-const-variable]
static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX = 0x00400000;
                      ^
10 errors generated.

This is simply fixed by putting those unused constants into the 
proper defines. I attached a patch against git 70b078c.

Greetings
Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flac_20140322.diff
Type: application/octet-stream
Size: 1212 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140322/21776459/attachment.obj 


More information about the flac-dev mailing list