Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266502
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] tools/vm/page-types: suppress gcc warnings |
| Date | 2015-11-10 14:40 +0100 |
| Message-ID | <qthjs-5Fv-13@gated-at.bofh.it> (permalink) |
| References | <qthjr-5Fv-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@gmail.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] tools/vm: trivial fixes Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
[PATCH 2/3] tools/vm/page-types: suppress gcc warnings Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings David Rientjes <rientjes@google.com> - 2015-11-11 21:50 +0100
Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:00 +0100
Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings David Rientjes <rientjes@google.com> - 2015-11-12 06:50 +0100
[PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types Christoph Lameter <cl@linux.com> - 2015-11-10 16:30 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types David Rientjes <rientjes@google.com> - 2015-11-11 22:00 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:20 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types David Rientjes <rientjes@google.com> - 2015-11-12 06:10 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 07:20 +0100
Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types David Rientjes <rientjes@google.com> - 2015-11-12 11:00 +0100
[PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Christoph Lameter <cl@linux.com> - 2015-11-10 16:30 +0100
Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-11 13:30 +0100
Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets David Rientjes <rientjes@google.com> - 2015-11-11 21:40 +0100
Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:00 +0100
csiph-web