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

Andrew Bartlett abartlet at samba.org
Thu Nov 9 21:58:04 UTC 2023


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. 

Andrew Bartlett
-- 
Andrew Bartlett (he/him)       https://samba.org/~abartlet/Samba Team Member (since 2001) https://samba.orgSamba Team Lead                https://catalyst.net.nz/services/sambaCatalyst.Net Ltd
Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company
Samba Development and Support: https://catalyst.net.nz/services/samba
Catalyst IT - Expert Open Source Solutions


More information about the samba-technical mailing list