Can we move Samba to C99 and past -Werror=declaration-after-statement ?

Christof Schmitt cs at samba.org
Fri Nov 10 00:17:30 UTC 2023


On Fri, Nov 10, 2023 at 10:58:04AM +1300, Andrew Bartlett via samba-technical wrote:
> Samba chooses to, for it's C style guide, to enforce -
> Werror=declaration-after-statement
> 
> I understand that some prefer the style.
> 
> However C has moved on as a language, and libraries we use (Python 3.12
> in this case) don't compile with it, and we are having to do quite some
> contortions in 
> https://gitlab.com/samba-team/samba/-/merge_requests/3373 to build on
> Fedora 39.
> 
> See also discussion at https://bugzilla.samba.org/show_bug.cgi?id=15513
> 
> Can we agree to just remove this requirement?  
> 
> It will allow us to keep variables closer to their use, which is
> helpful in a lot of ways, particularly in longer functions. 

That sounds reasonable, +1

Christof



More information about the samba-technical mailing list