From db352ca4883097da811001c344d346324a4da24a Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 18 Jan 2022 17:20:35 +0000 Subject: [PATCH] criu: fix configuration file scanner with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: criu/config.c: In function ‘parse_statement’: criu/config.c:232:43: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘*(configuration + (sizetype)((long unsigned int)i * 8)) + ((sizetype)offset + 1)’ must not be NULL [-Werror=address] 232 | if (configuration[i] + offset + 1 != 0 && strchr(configuration[i] + offset, ' ')) { | ^~ Signed-off-by: Adrian Reber --- criu/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/config.c b/criu/config.c index 91fb0b64d..33f2820a1 100644 --- a/criu/config.c +++ b/criu/config.c @@ -229,7 +229,7 @@ out: tmp_string[0] = 0; /* Check for unsupported configuration file entries */ - if (configuration[i] + offset + 1 != 0 && strchr(configuration[i] + offset, ' ')) { + if (strchr(configuration[i] + offset, ' ')) { int j; len = strlen(configuration[i] + offset); for (j = 0; j < len - 1; j++) {