Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Mar 2017 12:10:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 217532] sbin/newfs_nandfs/newfs_nandfs.c warning on unaligned pointer value
Message-ID:  <bug-217532-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217532

            Bug ID: 217532
           Summary: sbin/newfs_nandfs/newfs_nandfs.c warning on unaligned
                    pointer value
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: Trond.Endrestol@ximalas.info

Created attachment 180490
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180490&action=
=3Dedit
Patch for sbin/newfs_nandfs/newfs_nandfs.c eliminating the unaligned pointer
value warning

sbin/newfs_nandfs/newfs_nandfs.c in 12.0-CURRENT r314649 throws a warning on
unaligned pointer value:

newfs_nandfs/newfs_nandfs.c:543:11: error: taking address of packed member
'f_uuid' of class or structure 'nandfs_fsdata' may result in an unaligned
pointer value [-Werror,-Waddress-of-packed-member]
        uuidgen(&fsdata.f_uuid, 1);
                 ^~~~~~~~~~~~~
1 error generated.
*** [newfs_nandfs.o] Error code 1

The attached patch fixes this error.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217532-8>