From owner-svn-src-stable@freebsd.org Thu Apr 13 17:11:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5304ED3B2E2; Thu, 13 Apr 2017 17:11:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24C1AA8; Thu, 13 Apr 2017 17:11:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DHBprD039338; Thu, 13 Apr 2017 17:11:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DHBp73039337; Thu, 13 Apr 2017 17:11:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704131711.v3DHBp73039337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 13 Apr 2017 17:11:51 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 17:11:52 -0000 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 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);