Re: [PATCH] libelf: Use offsetof to get field of unaligned

2021-12-16 Thread Mark Wielaard
Hi Florian, On Wed, 2021-12-15 at 23:40 +0100, Florian Weimer via Elfutils-devel wrote: > * Mark Wielaard: > > > This seems a wrong warning since we aren't accessing the field member > > of the struct, but are taking the address of it. But we can do the > > same by adding the field offsetof to th

Re: [PATCH] libelf: Use offsetof to get field of unaligned

2021-12-15 Thread Florian Weimer via Elfutils-devel
* Mark Wielaard: > This seems a wrong warning since we aren't accessing the field member > of the struct, but are taking the address of it. But we can do the > same by adding the field offsetof to the base address. Which doesn't > trigger a runtime error. I think the warning is correct. I believ