aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-03-28 09:53:49 +0900
committerNIIBE Yutaka <[email protected]>2022-03-28 09:53:49 +0900
commit1517a31ea476b76f67289d07e2c2821aa4ef83ef (patch)
treecb2265b71f523c21d7ed7b7b63bb77a6fecd0c1d
parenta0db0a121571129b7149e51e98e5fbc6e35413e8 (diff)
downloadlibgcrypt-1517a31ea476b76f67289d07e2c2821aa4ef83ef.tar.gz
libgcrypt-1517a31ea476b76f67289d07e2c2821aa4ef83ef.tar.bz2
libgcrypt-1517a31ea476b76f67289d07e2c2821aa4ef83ef.zip
tests: Fix null pointer arithmetic.
* tests/bench-slope.c (slope_benchmark): Don't use null pointer. -- Compiler complains with -Wnull-pointer-substraction. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--tests/bench-slope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/bench-slope.c b/tests/bench-slope.c
index 4ff7140d..945df058 100644
--- a/tests/bench-slope.c
+++ b/tests/bench-slope.c
@@ -467,7 +467,7 @@ slope_benchmark (struct bench_obj *obj)
goto err_free;
/* Get aligned buffer */
buffer = real_buffer;
- buffer += 128 - ((real_buffer - (unsigned char *) 0) & (128 - 1));
+ buffer += 128 - ((unsigned long)real_buffer & (128 - 1));
if (unaligned_mode)
buffer += unaligned_mode; /* Make buffer unaligned */