diff options
author | Daniel Jordan <daniel.m.jordan@oracle.com> | 2018-10-03 08:50:20 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2018-10-03 08:50:20 +0800 |
commit | acefc2bab5860fe1aa7672428d095559eb58e17f (patch) | |
tree | 908cf7bb462631659c11d2b20ab70ad69aa3f153 | |
parent | f22de75338ff65d357364b4c973f79755cee43e1 (diff) | |
download | vm-scalability-acefc2bab5860fe1aa7672428d095559eb58e17f.tar.gz |
usemem: fix warning about unused ptr variable
gcc rightly complains,
usemem.c: In function ‘main’:
usemem.c:1183:18: warning: variable ‘ptr’ set but not used [-Wunused-but-set-variable]
unsigned char *ptr;
^
Simply remove ptr to silence the warning.
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
-rw-r--r-- | usemem.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1174,14 +1174,13 @@ int main(int argc, char *argv[]) int i; int number_of_pages; - unsigned char *ptr; unsigned char *p = (unsigned char *)allocate_hugepage_segment(opt_bytes); unsigned long pagesize = HUGE_PAGE_SIZE; char modify_nr_hugepages[50]; /* error checking done inside the mincore_hugepages function */ - ptr = mincore_hugepages(p, opt_bytes); + mincore_hugepages(p, opt_bytes); /* change protection of the hugepage segment */ if (mprotect(p, opt_bytes, PROT_WRITE) == -1) { |