Bug 815719

Summary: Fix build with gcc version 4.7.0
Product: [Fedora] Fedora Reporter: Stef Walter <stefw>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mgrepl, stefw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-24 15:10:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix build with gcc version 4.70
none
Fix build with gcc version 4.7.0 none

Description Stef Walter 2012-04-24 11:07:51 UTC
This error occurs:

cc -g -Werror -Wall -W -I/usr/include -DUSE_AUDIT   -c -o restore.o restore.c
restore.c: In function ‘restore_init’:
restore.c:62:3: error: missing braces around initializer [-Werror=missing-braces]
restore.c:62:3: error: (near initialization for ‘selinux_opts[0].<anonymous>’) [-Werror=missing-braces]
cc1: all warnings being treated as errors

with:

[stef@stef-desktop selinux]$ gcc --version
gcc (GCC) 4.7.0 20120416 (Red Hat 4.7.0-2)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Comment 1 Stef Walter 2012-04-24 11:07:55 UTC
Created attachment 579823 [details]
Fix build with gcc version 4.70

 * Union was initialized incorrectly

Comment 2 Stef Walter 2012-04-24 11:08:35 UTC
Created attachment 579824 [details]
Fix build with gcc version 4.7.0

* Union was initialized incorrectly

Comment 3 Daniel Walsh 2012-04-24 15:10:25 UTC
We have rewritten this code so this should not be a problem in policycoreutils-2.1.11-6.fc18