git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/1] Using sparse in a CI job

From
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Date
Feb 1, 2019, 22:40 UTC
Message-ID
<20190201223959.zmlyg4buwolw2b3p@ltop.local>
In-Reply-To
<78f85f0b-176f-0b54-2ec8-4c13fd386733@ramsayjones.plus.com>
On Fri, Feb 01, 2019 at 09:01:20PM +0000, Ramsay Jones wrote:
> 
> I suspect that the Makefile sparse target is not easy to use in a CI
> job, since the 'sparse' program (via cgcc -no-compile) does not exit
> with a non-zero value, even when issuing errors and warnings.
...
 
Show 16 quoted lines
> We can change that by passing '-Wsparse-error' to 'sparse':
> 
>   $ make SPARSE_FLAGS=-Wsparse-error change-table.sp
>       SP change-table.c
>   change-table.h:53:24: error: dubious one-bit signed bitfield
>   change-table.h:54:25: error: dubious one-bit signed bitfield
>   change-table.h:55:25: error: dubious one-bit signed bitfield
>   change-table.h:56:26: error: dubious one-bit signed bitfield
>   Makefile:2729: recipe for target 'change-table.sp' failed
>   make: *** [change-table.sp] Error 1
>   $ echo $?
>   2
>   $ 
> 
> Note that '-Wsparse-error' not only returns a non-zero exit code (1), but
> it also changes a 'warning' into an 'error' (see above):

Yes, I know :( The fact that, by default, sparse doesn't fail on errors is wanted (otherwise it would break the kernel compile). But that the only way to return an error is to use -Wsparse-error (which is supposed to replace GCC's -Werror) is a real problem.

-- Luc
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 7 in “Using sparse in a CI job”
  1. 0/1 Using sparse in a CI jobRamsay Jones, Feb 1, 2019
  2. Luc Van OostenryckFeb 1, 2019
  3. Ramsay JonesFeb 3, 2019
  4. SZEDER GáborFeb 2, 2019
  5. Ramsay JonesFeb 3, 2019
  6. SZEDER GáborFeb 3, 2019
  7. Ramsay JonesFeb 3, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.