Re: [PATCH] wpa_supplicant: Fix arithmetic on void pointer

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

 



Adding -Wpointer-arith to CFLAGS does the trick for gcc and clang.

Markus

On 10/8/19 10:20 PM, Johannes Berg wrote:
> On Tue, 2019-10-08 at 22:11 +0200, Jesus Fernandez Manzano wrote:
>> When using void pointers in calculations, the behaviour is undefined.
>> Arithmetic operations on 'void *' is a GNU C extension,
>> which defines the 'sizeof(void)' to be 1.
> I'm curious, do you have a compiler that tells you about this or
> something? Or how else did you find it?
>
> johannes
>
>
> _______________________________________________
> Hostap mailing list
> Hostap@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/hostap

-- 
Markus Theil

Technische Universität Ilmenau, Fachgebiet Telematik/Rechnernetze
Postfach 100565
98684 Ilmenau, Germany

Phone: +49 3677 69-4582
Email: markus[dot]theil[at]tu-ilmenau[dot]de
Web: http://www.tu-ilmenau.de/telematik


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux