From dbac2039e81f6d371acdacfb65eba10e395bb9a2 Mon Sep 17 00:00:00 2001 From: Monty Date: Thu, 8 Aug 2019 20:05:40 +0300 Subject: Fixed some errors & warnings found by clang - pcretest.c could use macro with side effect - maria_chk could access freed memory - Initialized some variables that could be accessed uninitalized - Fixed compiler warning in my_atomic-t.c --- unittest/mysys/my_atomic-t.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unittest/mysys/my_atomic-t.c') diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c index 83c46c24d3f..d358b939b4d 100644 --- a/unittest/mysys/my_atomic-t.c +++ b/unittest/mysys/my_atomic-t.c @@ -90,10 +90,10 @@ pthread_handler_t test_atomic_cas(void *arg) y= my_atomic_load32(&bad); x= (x*m+0x87654321) & INT_MAX32; do { - ok= my_atomic_cas32(&bad, &y, (uint32)y+x); + ok= my_atomic_cas32((int32*) &bad, &y, y+x); } while (!ok) ; do { - ok= my_atomic_cas32(&bad, &y, y-x); + ok= my_atomic_cas32((int32*) &bad, &y, y-x); } while (!ok) ; } return 0; -- cgit v1.2.1