Bug 815719 - Fix build with gcc version 4.7.0
Fix build with gcc version 4.7.0
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
rawhide
All All
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 07:07 EDT by Stef Walter
Modified: 2012-04-24 11:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-24 11:10:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix build with gcc version 4.70 (1.01 KB, patch)
2012-04-24 07:07 EDT, Stef Walter
no flags Details | Diff
Fix build with gcc version 4.7.0 (1.01 KB, patch)
2012-04-24 07:08 EDT, Stef Walter
no flags Details | Diff

  None (edit)
Description Stef Walter 2012-04-24 07:07:51 EDT
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 07:07:55 EDT
Created attachment 579823 [details]
Fix build with gcc version 4.70

 * Union was initialized incorrectly
Comment 2 Stef Walter 2012-04-24 07:08:35 EDT
Created attachment 579824 [details]
Fix build with gcc version 4.7.0

* Union was initialized incorrectly
Comment 3 Daniel Walsh 2012-04-24 11:10:25 EDT
We have rewritten this code so this should not be a problem in policycoreutils-2.1.11-6.fc18

Note You need to log in before you can comment on or make changes to this bug.