Bug 815719 - Fix build with gcc version 4.7.0
Summary: Fix build with gcc version 4.7.0
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-24 11:07 UTC by Stef Walter
Modified: 2012-04-24 15:10 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-04-24 15:10:25 UTC
Type: ---
Embargoed:


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

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


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