CI failure on account of C99

Andreas Schneider asn at cryptomilk.org
Tue Apr 13 13:23:37 UTC 2021


On Tuesday, 13 April 2021 14:49:13 CEST Philipp Gesang via samba-technical 
wrote:
> On Tuesday, 2021-04-13 22:20:31 +1200 Douglas Bagnall
> <douglas.bagnall at catalyst.net.nz> wrote
> > On 13/04/21 9:34 pm, Philipp Gesang via samba-technical wrote:
> > >     ../../lib/util/tests/time.c:119:2: error: ‘for’ loop initial
> > >     declarations are only allowed in C99 mode> >     
> > >       for (int i = 0; i < sizeof(data) / sizeof(data[0]); ++i) {
> > >       ^
> > >     
> > >     ../../lib/util/tests/time.c:119:2: note: use option -std=c99 or
> > >     -std=gnu99 to compile your code> > 
> > > AFAICS there’s numerous C99 constructs all over the source and
> > > README.Coding explicitly mentions it. Is there a special
> > > precaution that must be taken for this test target to work?
> > 
> > The Samba style is to declare all the things first.
> 
> Ok, centos7 is happy now. Thanks for the explanation.

In case we want to fix that correctly on gcc and maybe other compilers:

https://gitlab.com/samba-team/samba/-/merge_requests/1899



-- 
Andreas Schneider                 asn at cryptomilk.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list