svn commit: r264177 - in head/sys/dev/hyperv: netvsc storvsc

Bruce Evans brde at
Sun Apr 6 09:07:39 UTC 2014

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.


More information about the svn-src-head mailing list