Linux SPARSE checker discussions
 help / color / mirror / Atom feed
diff for duplicates of <20200705130220.26230-3-luc.vanoostenryck@gmail.com>

diff --git a/a/1.txt b/N1/1.txt
index bb0ffef..56164d8 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -23,3 +23,24 @@ index 709dd5176112..5128a5b64e9e 100644
 -		}
 -		return NULL;
 -	}
+-
+ 	// Prefixes "no" and "no-" mean to turn warning off.
+ 	if (p[0] == 'n' && p[1] == 'o') {
+ 		p += 2;
+@@ -798,6 +790,14 @@ static char **handle_switch_W(char *arg, char **next)
+ 	if (ret)
+ 		return ret;
+ 
++	if (!strcmp(arg, "Wsparse-all")) {
++		int i;
++		for (i = 0; warnings[i].name; i++) {
++			if (*warnings[i].flag != WARNING_FORCE_OFF && warnings[i].flag != &Wsparse_error)
++				*warnings[i].flag = WARNING_ON;
++		}
++	}
++
+ 	// Unknown.
+ 	return next;
+ }
+-- 
+2.27.0
diff --git a/a/content_digest b/N1/content_digest
index e203c96..d705099 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -30,6 +30,27 @@
  "-\t\t\t\t*warnings[i].flag = WARNING_ON;\n"
  "-\t\t}\n"
  "-\t\treturn NULL;\n"
- "-\t}"
+ "-\t}\n"
+ "-\n"
+ " \t// Prefixes \"no\" and \"no-\" mean to turn warning off.\n"
+ " \tif (p[0] == 'n' && p[1] == 'o') {\n"
+ " \t\tp += 2;\n"
+ "@@ -798,6 +790,14 @@ static char **handle_switch_W(char *arg, char **next)\n"
+ " \tif (ret)\n"
+ " \t\treturn ret;\n"
+ " \n"
+ "+\tif (!strcmp(arg, \"Wsparse-all\")) {\n"
+ "+\t\tint i;\n"
+ "+\t\tfor (i = 0; warnings[i].name; i++) {\n"
+ "+\t\t\tif (*warnings[i].flag != WARNING_FORCE_OFF && warnings[i].flag != &Wsparse_error)\n"
+ "+\t\t\t\t*warnings[i].flag = WARNING_ON;\n"
+ "+\t\t}\n"
+ "+\t}\n"
+ "+\n"
+ " \t// Unknown.\n"
+ " \treturn next;\n"
+ " }\n"
+ "-- \n"
+ 2.27.0
 
-3c626de79d2e3fed7a444f5cea98c5d30c5017b18e1d4b65e306646bfc9e08e3
+9ec57cbfc6e0c65ce1238bc9e097673a9c8d8b798f772b8e367689bba63834e4

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox