Date: Sat, 4 Mar 2017 16:59:55 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314671 - head/sbin/newfs_nandfs Message-ID: <201703041659.v24GxtGL070123@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Mar 4 16:59:55 2017 New Revision: 314671 URL: https://svnweb.freebsd.org/changeset/base/314671 Log: newfs_nandfs: Fix unaligned pointer warning PR: 217532 Submitted by: Trond Endrestol <Trond.Endrestol at ximalas.info> Modified: head/sbin/newfs_nandfs/newfs_nandfs.c Modified: head/sbin/newfs_nandfs/newfs_nandfs.c ============================================================================== --- head/sbin/newfs_nandfs/newfs_nandfs.c Sat Mar 4 15:23:06 2017 (r314670) +++ head/sbin/newfs_nandfs/newfs_nandfs.c Sat Mar 4 16:59:55 2017 (r314671) @@ -520,6 +520,7 @@ save_segsum(struct nandfs_segment_summar static void create_fsdata(void) { + struct uuid tmp; memset(&fsdata, 0, sizeof(struct nandfs_fsdata)); @@ -540,7 +541,8 @@ create_fsdata(void) fsdata.f_checkpoint_size = sizeof(struct nandfs_checkpoint); fsdata.f_segment_usage_size = sizeof(struct nandfs_segment_usage); - uuidgen(&fsdata.f_uuid, 1); + uuidgen(&tmp, 1); + fsdata.f_uuid = tmp; if (volumelabel) memcpy(fsdata.f_volume_name, volumelabel, 16);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703041659.v24GxtGL070123>