Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2017 17:11:51 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r316772 - in stable: 10/sbin/newfs_nandfs 11/sbin/newfs_nandfs
Message-ID:  <201704131711.v3DHBp73039337@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Apr 13 17:11:50 2017
New Revision: 316772
URL: https://svnweb.freebsd.org/changeset/base/316772

Log:
  MFC r314671 (by cem):
  
  newfs_nandfs: Fix unaligned pointer warning
  
  PR:		217532
  Submitted by:	Trond Endrestol <Trond.Endrestol at ximalas.info>

Modified:
  stable/10/sbin/newfs_nandfs/newfs_nandfs.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sbin/newfs_nandfs/newfs_nandfs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sbin/newfs_nandfs/newfs_nandfs.c
==============================================================================
--- stable/10/sbin/newfs_nandfs/newfs_nandfs.c	Thu Apr 13 17:11:49 2017	(r316771)
+++ stable/10/sbin/newfs_nandfs/newfs_nandfs.c	Thu Apr 13 17:11:50 2017	(r316772)
@@ -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?201704131711.v3DHBp73039337>