mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
Do a pass of compiler warning fixes.
This is really making me question not using 64-bit integers more.
This commit is contained in:
parent
243e1d8462
commit
58240fdb33
21 changed files with 89 additions and 84 deletions
|
@ -202,10 +202,10 @@ char* strchr(const char* str, int c)
|
|||
void* memchr(const void* ptr, int c, size_t size)
|
||||
{
|
||||
char ch = c;
|
||||
char* cptr = (char*)ptr;
|
||||
auto* cptr = (const char*)ptr;
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
if (cptr[i] == ch)
|
||||
return cptr + i;
|
||||
return const_cast<char*>(cptr + i);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ char* strpbrk(const char* s, const char* accept)
|
|||
{
|
||||
while (*s)
|
||||
if(strchr(accept, *s++))
|
||||
return (char*)--s;
|
||||
return const_cast<char*>(--s);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue