Re: [PATCH 2/2] Fix gptsync/lib.c for gcc strict aliasing rules.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens wrote:
diff --git a/gptsync/lib.c b/gptsync/lib.c
index 271dc99..f2d71b2 100644
--- a/gptsync/lib.c
+++ b/gptsync/lib.c
@@ -316,7 +316,7 @@ UINTN detect_mbrtype_fs(UINT64 partlba, UINTN *parttype, CHARN **fsname)
         return status;
// detect XFS
-    signature = *((UINT32 *)(sector));
+    memcpy(&signature, sector, sizeof(UINT32));
     if (signature == 0x42534658) {
         *parttype = 0x83;
         *fsname = STR("XFS");
@@ -393,7 +393,7 @@ UINTN detect_mbrtype_fs(UINT64 partlba, UINTN *parttype, CHARN **fsname)
         return status;
// detect HFS+
-    signature = *((UINT16 *)(sector));
+    memcpy(&signature, sector, sizeof(UINT16));
     if (signature == 0x4442) {
         *parttype = 0xaf;
         if (*((UINT16 *)(sector + 0x7c)) == 0x2B48)

Also looks fine.  Say, weren't we getting rid of gptsync?

Probably, but for now it's there and I really only want to get a build through right now.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux