summaryrefslogtreecommitdiffstats
path: root/fdisk/fdiskaixlabel.c
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: fix strict-aliasing bugsKarel Zak2009-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 4.4 produces tons of "dereferencing type-punned pointer will break strict-aliasing rules" warnings for fdisk code where is char buffer[BUFSIZ]; ((struct disklabel *) MBRBuffer)->foo There are two ways how fix the problem: 1/ union { char buffer[BUFSIZ], struct disklabel label } MBRBuffer; 2/ use allocated buffer, this way seems less invasive. This patch implements 2/. Old version: $ make -C fdisk | grep -c warning 236 New version: $ make -C fdisk | grep -c warning 0 About aliasing: - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40665 - http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html - C99 Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-1/+0Star
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-4/+3Star
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-3/+10
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-0/+64