mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
imporve clang build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
This commit is contained in:
@ -608,8 +608,8 @@ int String::strstr(const String &s,uint32 offset)
|
||||
if (!s.length())
|
||||
return ((int) offset); // Empty string is always found
|
||||
|
||||
register const char *str = Ptr+offset;
|
||||
register const char *search=s.ptr();
|
||||
const char *str = Ptr+offset;
|
||||
const char *search=s.ptr();
|
||||
const char *end=Ptr+str_length-s.length()+1;
|
||||
const char *search_end=s.ptr()+s.length();
|
||||
skip:
|
||||
@ -617,7 +617,7 @@ skip:
|
||||
{
|
||||
if (*str++ == *search)
|
||||
{
|
||||
register char *i,*j;
|
||||
char *i,*j;
|
||||
i=(char*) str; j=(char*) search+1;
|
||||
while (j != search_end)
|
||||
if (*i++ != *j++) goto skip;
|
||||
@ -638,8 +638,8 @@ int String::strrstr(const String &s,uint32 offset)
|
||||
{
|
||||
if (!s.length())
|
||||
return offset; // Empty string is always found
|
||||
register const char *str = Ptr+offset-1;
|
||||
register const char *search=s.ptr()+s.length()-1;
|
||||
const char *str = Ptr+offset-1;
|
||||
const char *search=s.ptr()+s.length()-1;
|
||||
|
||||
const char *end=Ptr+s.length()-2;
|
||||
const char *search_end=s.ptr()-1;
|
||||
@ -648,7 +648,7 @@ skip:
|
||||
{
|
||||
if (*str-- == *search)
|
||||
{
|
||||
register char *i,*j;
|
||||
char *i,*j;
|
||||
i=(char*) str; j=(char*) search-1;
|
||||
while (j != search_end)
|
||||
if (*i-- != *j--) goto skip;
|
||||
|
Reference in New Issue
Block a user