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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 19 Jan 2021 14:43:13 +0800
From:   Hui Zhu <teawater@...il.com>
To:     wufengguang@...wei.com, linux-kernel@...r.kernel.org
Cc:     Hui Zhu <teawaterz@...ux.alibaba.com>
Subject: [PATCH] usemem: Remove the duplicate do_access

From: Hui Zhu <teawaterz@...ux.alibaba.com>

Got following error when build usemem:
gcc -O -c -Wall -g  usemem.c -o usemem.o
usemem.c:451:15: error: redefinition of ‘do_access’
 unsigned long do_access(unsigned long *p, unsigned long idx, int read)
               ^~~~~~~~~
usemem.c:332:15: note: previous definition of ‘do_access’ was here
 unsigned long do_access(unsigned long *p, unsigned long idx, int read)
               ^~~~~~~~~
make: *** [usemem.o] Error 1

Remove the duplicate do_access to fix this error.

Signed-off-by: Hui Zhu <teawaterz@...ux.alibaba.com>
---
 usemem.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/usemem.c b/usemem.c
index 48c3d65..e2c46ec 100644
--- a/usemem.c
+++ b/usemem.c
@@ -329,18 +329,6 @@ void detach(void)
 	}
 }
 
-unsigned long do_access(unsigned long *p, unsigned long idx, int read)
-{
-	volatile unsigned long *vp = p;
-
-	if (read)
-		return vp[idx];	/* read data */
-	else {
-		vp[idx] = idx;	/* write data */
-		return 0;
-	}
-}
-
 unsigned long * allocate(unsigned long bytes)
 {
 	unsigned long *p;
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ