-Werror=format-security (Re: [PATCH] Fix the build)

Andrew Bartlett abartlet at samba.org
Mon Sep 5 08:13:27 UTC 2016


On Mon, 2016-09-05 at 09:24 +0200, Stefan Metzmacher wrote:
> Hi,
> 
> I think we should use -Werror=format-security by default if supported
> by the compiler. This way autobuild will catch this before it lands
> in
> master.
> 
> Please review and push the attached patch.

Reviewed-by: Andrew Bartlett <abartlet at samba.org>

Pushed!

> Thanks!
> metze
> 
> > 
> > Review appreciated!
> > 
> > Looking at commit 1c636532874da from a few weeks ago I begin to
> > question
> > the value of our README.Coding file. I've asked a few times to fix
> > patches to follow the 80-column rule, I even provided patches to
> > assist.
> > 
> > There's a reason why we have this rule: It's not that we are all
> > sitting
> > at 3270 or vt100 terminals. We want to avoid arbitrarily deeply
> > nested
> > control structures. It might be more work, but well-named factored
> > out subfunctions foster unterstanding of complex code. Looking at
> > dsdb_garbage_collect_tombstones(), we have four (!!)  levels of
> > nested
> > for-loops. One line I've just come across almost touches twice the
> > 80-columns with its length of 157 chars.
> > 
> > So, shall we drop the README.Coding section on 80 chars, as it is
> > not
> > generally seen as worthwhile following?
> > 
> > Volker
> > 
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list