From owner-svn-src-head@freebsd.org Wed May 18 20:14:13 2016 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 2DD69B41E44; Wed, 18 May 2016 20:14:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0093D18F2; Wed, 18 May 2016 20:14:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id y7so5909405pfb.0; Wed, 18 May 2016 13:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=dmMa4ccm5azUZS0shvqNwI0iM1JFZhmnApAOdAb45m8=; b=lzmxjKDImaaHijEaY08tM8d4FXL5zje1ptgYMdQWboPXxKSRDwVGyq/KvlIw4vKh5l ekv+r0eXt+k8NZtAWY5lvuW7WRds4TnwUIUbL0z3bcbBhIHPX6ENmRj4W3O95Avc6U6R QJ2w8A59kVrAJYiTwFpJ+ynaLj3pRPjS9DhqGgAGwjYH8Fd4RDnyHwyB2mhCP9A+jXHx frlFVLsCo44eAXjMZz2UPJBiYF+tLoC5pRf6P51ZDZCyQTzNgzARUpV3kF6n8TZt8MrW WSo4QxiqokjR2I7e0VnABEjFoUhfSPDo9LIUZT5sdR+x8hUjzNZWsIg08aiJTFoVgl61 n47A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=dmMa4ccm5azUZS0shvqNwI0iM1JFZhmnApAOdAb45m8=; b=LJZeljW22ziiFCaonQo102GsEwIyUGd0LPHKHjuIaMoTELGDIrtVzsgwo8w7wmXJn7 uYyXyDyrj57uv4RUQ42A4YyrqJY1Ke5pvGyWMN0B8ndYBQ3ZMvYCSp+NumP7dO7/MQXB 1NTC6o/nwkJzv5GZ0CHvvcLlKAPIZWiEAoU/UGOCDO1P/Ix2GXMCPJW39F+ZFkINn0Dt +4ZqoYxhIqmaTYIACFdchz0zrxk8oCDPgbCHz3EbrIuSpUd4Qe/11IlEaUyj2FQKNFhg TTdI5hBVEOZlMV9s0xlY9wYkE3khe4DOKQdiIxfpaaeeXeBMxe/URmP+XnHkvwWskbGY ggKw== X-Gm-Message-State: AOPr4FXSJugNIemFEvphigQLeym9oDKpeQ01ClXoOMkl8pR3KtV6Fjs7HbK2RL3WQnSbKw== X-Received: by 10.98.20.197 with SMTP id 188mr13669883pfu.144.1463602452595; Wed, 18 May 2016 13:14:12 -0700 (PDT) Received: from [21.177.199.178] ([172.56.42.72]) by smtp.gmail.com with ESMTPSA id s14sm12994023pag.7.2016.05.18.13.14.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 May 2016 13:14:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Ngie Cooper Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r299830 - head/contrib/bsnmp/snmpd Date: Wed, 18 May 2016 13:07:01 -0700 Message-Id: <7C423729-7685-41B8-9813-FF02A02B587A@gmail.com> References: <201605150336.u4F3aJxd062168@repo.freebsd.org> <20160518182135.GL1015@FreeBSD.org> Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <20160518182135.GL1015@FreeBSD.org> To: Gleb Smirnoff X-Mailer: iPhone Mail (13F69) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Wed, 18 May 2016 20:14:13 -0000 > On May 18, 2016, at 11:21, Gleb Smirnoff wrote: >=20 > Garrett, >=20 > On Sun, May 15, 2016 at 03:36:19AM +0000, Garrett Cooper wrote: > G> Author: ngie > G> Date: Sun May 15 03:36:19 2016 > G> New Revision: 299830 > G> URL: https://svnweb.freebsd.org/changeset/base/299830 > G>=20 > G> Log: > G> Fix -Wcast-align warnings > G> =20 > G> Use memcpy instead of using direct assignment of void* pointers with > G> CMSG_DATA(..), which changes alignment > G> =20 > G> MFC after: 3 weeks > G> Reported by: clang > G> Sponsored by: EMC / Isilon Storage Division > G>=20 > G> Modified: > G> head/contrib/bsnmp/snmpd/main.c > G>=20 > G> Modified: head/contrib/bsnmp/snmpd/main.c > G> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > G> --- head/contrib/bsnmp/snmpd/main.c Sun May 15 03:22:13 2016 (r29= 9829) > G> +++ head/contrib/bsnmp/snmpd/main.c Sun May 15 03:36:19 2016 (r29= 9830) > G> @@ -1169,7 +1169,7 @@ recv_dgram(struct port_input *pi, struct > G> memcpy(laddr, CMSG_DATA(cmsg), sizeof(struct in_addr)); > G> if (cmsg->cmsg_level =3D=3D SOL_SOCKET && > G> cmsg->cmsg_type =3D=3D SCM_CREDS) > G> - cred =3D (struct sockcred *)CMSG_DATA(cmsg); > G> + memcpy(cred, CMSG_DATA(cmsg), sizeof(struct sockcred)); >=20 > And cred is always NULL at this point, isn't it? markj noted this as well. This is the one commit I should have had reviewed b= y other folks because I missed this point. I'll revert the commit, mute the warning, and move on... Every time I've tri= ed fixing CMSG I've ended up with headaches, so... I'm likely not the right p= erson to be fixing these issues. Thanks, -Ngie=