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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1447162326-30626-3-git-send-email-sergey.senozhatsky@gmail.com>
Date:	Tue, 10 Nov 2015 22:32:05 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	David Rientjes <rientjes@...gle.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings

Define 'end' and 'first' as volatile to suppress
gcc warnings:

page-types.c:854:13: warning: variable 'end' might be
   clobbered by 'longjmp' or 'vfork' [-Wclobbered]
page-types.c:858:6: warning: variable 'first' might be
   clobbered by 'longjmp' or 'vfork' [-Wclobbered]

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
---
 tools/vm/page-types.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/vm/page-types.c b/tools/vm/page-types.c
index bcf5ec7..0651cd5 100644
--- a/tools/vm/page-types.c
+++ b/tools/vm/page-types.c
@@ -851,11 +851,12 @@ static void walk_file(const char *name, const struct stat *st)
 	uint8_t vec[PAGEMAP_BATCH];
 	uint64_t buf[PAGEMAP_BATCH], flags;
 	unsigned long nr_pages, pfn, i;
-	off_t off, end = st->st_size;
+	off_t off;
 	int fd;
 	ssize_t len;
 	void *ptr;
-	int first = 1;
+	volatile int first = 1;
+	volatile off_t end = st->st_size;
 
 	fd = checked_open(name, O_RDONLY|O_NOATIME|O_NOFOLLOW);
 
-- 
2.6.2.280.g74301d6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ