diff options
author | Monty <monty@mariadb.org> | 2019-08-08 20:05:40 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-08-08 23:08:23 +0300 |
commit | dbac2039e81f6d371acdacfb65eba10e395bb9a2 (patch) | |
tree | 268c85900d5a4bed5f8dd881019ee7e3833b4f98 /unittest/mysys | |
parent | 5fa2eb6f3d8210ce73d18e518108f32c29b11d63 (diff) | |
download | mariadb-git-dbac2039e81f6d371acdacfb65eba10e395bb9a2.tar.gz |
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
Diffstat (limited to 'unittest/mysys')
-rw-r--r-- | unittest/mysys/my_atomic-t.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |