1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-28 17:36:30 +03:00

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
This commit is contained in:
Monty
2019-08-08 20:05:40 +03:00
parent 5fa2eb6f3d
commit dbac2039e8
5 changed files with 9 additions and 6 deletions

View File

@@ -2864,7 +2864,8 @@ strncmpic(pcre_uint8 *s, pcre_uint8 *t, int n)
{
while (n--)
{
int c = tolower(*s++) - tolower(*t++);
int c = tolower(*s) - tolower(*t);
s++; t++;
if (c) return c;
}
return 0;