From owner-svn-src-head@freebsd.org Sat Mar 4 16:59:56 2017 Return-Path: Delivered-To: svn-src-head@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 65625CF9720; Sat, 4 Mar 2017 16:59:56 +0000 (UTC) (envelope-from cem@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 33B6116FA; Sat, 4 Mar 2017 16:59:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v24GxttH070124; Sat, 4 Mar 2017 16:59:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v24GxtGL070123; Sat, 4 Mar 2017 16:59:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703041659.v24GxtGL070123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 4 Mar 2017 16:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314671 - head/sbin/newfs_nandfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 16:59:56 -0000 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 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);