aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jordan <daniel.m.jordan@oracle.com>2018-10-03 08:50:20 +0800
committerFengguang Wu <fengguang.wu@intel.com>2018-10-03 08:50:20 +0800
commitacefc2bab5860fe1aa7672428d095559eb58e17f (patch)
tree908cf7bb462631659c11d2b20ab70ad69aa3f153
parentf22de75338ff65d357364b4c973f79755cee43e1 (diff)
downloadvm-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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usemem.c b/usemem.c
index bd22d98..297f030 100644
--- a/usemem.c
+++ b/usemem.c
@@ -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) {