Some patches to compile with gcc-next

Thomas Schulz schulz at adi.com
Fri Nov 4 17:51:08 UTC 2016


> > In this case it looks like this test is using snprintf to truncate on
> > purpose, and that is fine. For this I modified the relevant
> > wscript_build to disable the error. At first I thought I needed to use
> > "-Wno-format-length", but it seems "-Wformat-length" also does the
> > trick by turning the -Werror back into a warning.
> 
> Unfortunately this fails on GCC 5.4 and is thus a bad solution.
> "-Wno-format-length" does work though.
> 
> Douglas

gcc version 4.7.2 treats specifying -Wformat-length as an error. It will
allow -Wno-format-length. I don't know what older versions of gcc will do.
You probably need a test to see if these are allowed before you use them.

Tom Schulz
Applied Dynamics Intl.
schulz at adi.com



More information about the samba-technical mailing list