-Wcast-qual Re: [PATCHES v4] Another round of FreeBSD developer build fixes

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Nov 25 13:02:43 UTC 2017


On Sat, Nov 25, 2017 at 01:02:28PM +0100, Stefan Metzmacher via samba-technical wrote:
> >>> I would like some broader comment on:
> >>>
> >>> [PATCH v4 08/13] build: remove -Wcast-align from developer build
> 
> Please don't remove -Wcast-align! The following should allow the build:
> 
> ADDITIONAL_CFLAGS="-Wno-error=cast-align" ./configure.developer
> --picky-developer
> 
> We use something similar with -Wno-error=deprecated-declarations.

Genuine question: How do we deal with that properly? A
standards-compliant way might be a memcpy to a variable on the stack,
but this might be very inefficient for large structures. Also, for
example in talloc.c we inevitably do some casting to structs. How is
that possible in a portable manner that does not generate warnings?

Volker

> 
> metze
> 




-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list