[PATCH libdrm] Make sure the second argument to container_of() is initialized
Michel Dänzer
michel at daenzer.net
Wed Aug 3 08:56:47 UTC 2016
On 03.08.2016 02:49, Nicolai Hähnle wrote:
> On 02.08.2016 12:08, Michel Dänzer wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> Fixes warnings and miscompilation resulting in crashes with clang.
>
> How annoying. Seems like this would affect most (current and future)
> uses of container_of, and so it would be better to switch to the Linux
> kernel version of container_of, where the second parameter is the type...
Rob proposed http://hastebin.com/vefenavoje.coffee on IRC, using
typeof(). I'm fine with going for that instead of my patch, just FYI: My
patch was based on xserver's list.h, which works with compilers which
don't support typeof(). Not sure that's relevant for libdrm though.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the dri-devel
mailing list