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

Makefile: drop -Wno-universal-initializer from SP_EXTRA_FLAGS

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jul 18, 2024, 01:12 UTC
Message-ID
<587e339a-8520-48d5-8090-e8d8bfb0c1f4@ramsayjones.plus.com>

Commit 1c96642326 ("sparse: allow '{ 0 }' to be used without warnings", 2020-05-22) added -Wno-universal-initializer to the SP_EXTRA_FLAGS in order to suppress potential sparse warnings from using '{0}' as an aggregate initializer. At that time, the default was for sparse to issue warnings (i.e. the default was -Wuniversal-initializer) if such an initializer was used to initialize an aggregate whose first member was a pointer type. However, this default was changed just a few days later to -Wno-universal-initializer (first released in sparse v0.6.2) and has been so in all subsequent release versions of sparse. Thus, including -Wno-universal-initializer in the SP_EXTRA_FLAGS variable is redundant.

Remove the unnecessary warning flag from SP_EXTRA_FLAGS, essentially reverting commit 1c96642326.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d6479092a0..ce3ff2476c 100644
--- a/Makefile
+++ b/Makefile
@@ -1376,7 +1376,7 @@ PTHREAD_CFLAGS =
 
 # For the 'sparse' target
 SPARSE_FLAGS ?= -std=gnu99
-SP_EXTRA_FLAGS = -Wno-universal-initializer
+SP_EXTRA_FLAGS =
 
 # For informing GIT-BUILD-OPTIONS of the SANITIZE=leak,address targets
 SANITIZE_LEAK =
-- 
2.45.0
Message 1 of 1 in “Makefile: drop -Wno-universal-initializer from SP_EXTRA_FLAGS”
  1. Ramsay JonesJul 18, 2024

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.