Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 2014 19:07:30 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r264177 - in head/sys/dev/hyperv: netvsc storvsc
Message-ID:  <20140406190024.V5281@besplex.bde.org>
In-Reply-To: <201404052242.s35Mg1ES027714@svn.freebsd.org>
References:  <201404052242.s35Mg1ES027714@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140406190024.V5281>