From owner-svn-src-head@FreeBSD.ORG Sun Apr 6 09:07:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DAC16D7; Sun, 6 Apr 2014 09:07:39 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id F153B932; Sun, 6 Apr 2014 09:07:38 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 32D6DD62029; Sun, 6 Apr 2014 19:07:31 +1000 (EST) Date: Sun, 6 Apr 2014 19:07:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh Subject: Re: svn commit: r264177 - in head/sys/dev/hyperv: netvsc storvsc In-Reply-To: <201404052242.s35Mg1ES027714@svn.freebsd.org> Message-ID: <20140406190024.V5281@besplex.bde.org> References: <201404052242.s35Mg1ES027714@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=U6SrU4bu c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=hhxHlBTYTMkA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=cMwDT-I2r2K7gtRvf_sA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 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: Sun, 06 Apr 2014 09:07:39 -0000 On Sat, 5 Apr 2014, Warner Losh wrote: > Log: > Make some unwise casts. On i386 these casts wind up being safe. Rather > than disturb the API, go with these casts to shut gcc up. Another reply. The bug is mostly in clang. It doesn't complain about casting pointers to integers that are neither uintptr_t or intptr_t, even when the cast is to a smaller size, so it doesn't detect the wrong casts being used here. So the bugs build up until they are detected by compiling with gcc (or coverity?). Here the casts are to a larger size. The style bug is still very large, since the casts are used to suppress the warning for conversion from pointer to integer without an explicit cast. Casts to break warnings should be correct. Bruce