lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200702231039.55015-3-luc.vanoostenryck@gmail.com>
Date:   Fri,  3 Jul 2020 01:10:26 +0200
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: [PATCH 02/15] options: move -Wsparse-all's processing out of handle_onoff_switch()

Since handle_onoff_switch() can be used for other flags than the
warnings, the processing of -Wsparse-all should move elsewhere.

So move it into handle_switch_W().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
---
 lib.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib.c b/lib.c
index 709dd5176112..5128a5b64e9e 100644
--- a/lib.c
+++ b/lib.c
@@ -535,14 +535,6 @@ static char **handle_onoff_switch(char *arg, char **next, const struct flag warn
 	char *p = arg + 1;
 	unsigned i;
 
-	if (!strcmp(p, "sparse-all")) {
-		for (i = 0; warnings[i].name; i++) {
-			if (*warnings[i].flag != WARNING_FORCE_OFF && warnings[i].flag != &Wsparse_error)
-				*warnings[i].flag = WARNING_ON;
-		}
-		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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ