From 364c343fb8adf95ce0a75757c20c56d63738bb595e742486dc364f35dbea93e4 Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Thu, 2 Jun 2011 06:41:32 +0000 Subject: [PATCH] add workaround for -Werror=format-security false positives on Mandriva OBS-URL: https://build.opensuse.org/package/show/utilities/cpuid?expand=0&rev=2 --- cpuid.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpuid.spec b/cpuid.spec index b3bb669..9b7f3e0 100644 --- a/cpuid.spec +++ b/cpuid.spec @@ -20,7 +20,11 @@ and is fairly complete. %setup -q %build -%__make CFLAGS="%{optflags} -Wall" +# remove -Werror=format-security which is used on Mandriva, as it produces +# a false positive compiler error on several printf calls: +CFLAGS=$(echo "%{optflags} -Wall"| %__sed 's/-Werror=format-security//g') + +%__make CFLAGS="$CFLAGS" %install %__install -D -m 0755 cpuid "%{buildroot}%{_bindir}/cpuid"