Re: [PATCH] ci: do not die on deprecated-declarations warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14/01/2023 14:29, Ramsay Jones wrote:
> Hi Junio,
[snip]

> Sorry for not looking into this (and notifying the list) sooner.

Ah, that reminds me...

When I updated to Linux Mint v21.0 (based on latest Ubuntu LTS) last
year, sparse started failing. This was due to a change to the 'regex.h'
header file (the libc6-dev package version was updated from 2.31 to
2.35), where (among other things) the diff looked like:

..

524a525,548
> #ifndef _REGEX_NELTS
> # if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
>       && !defined __STDC_NO_VLA__)
> #  define _REGEX_NELTS(n) n
> # else
> #  define _REGEX_NELTS(n)
> # endif
> #endif
> 

..

645c681,682
<                   regmatch_t __pmatch[_Restrict_arr_],
---
>                   regmatch_t __pmatch[_Restrict_arr_
>                                       _REGEX_NELTS (__nmatch)],

..

The last hunk is the declaration of regexec(), thus:

extern int regexec (const regex_t *_Restrict_ __preg,
                    const char *_Restrict_ __String, size_t __nmatch,
                    regmatch_t __pmatch[_Restrict_arr_
                                        _REGEX_NELTS (__nmatch)],
                    int __eflags);

So, sparse falls over on the '__nmatch' as part of the __pmatch
argument declaration. [Actually, it doesn't bomb out on the
declaration, but at each regexec() call site].

To fix my build, I added the following to my config.mak file on linux:

    SPARSE_FLAGS += -D__STDC_NO_VLA__

.. and forgot about it! :)

I need to fix this sometime.

ATB,
Ramsay Jones





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux