Re: [PATCH libdrm] Make sure the second argument to container_of() is initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 3, 2016 at 4:56 AM, Michel Dänzer <michel@xxxxxxxxxxx> wrote:
> 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@xxxxxxx>
>>>
>>> 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.

Actually I already went ahead and pushed that patch too.  Although
there may be other list implementations that need the same thing.

BR,
-R
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux