mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Disable warning for false positive
This commit is contained in:
parent
5b99e2c568
commit
ae4f632bbd
|
@ -81,8 +81,15 @@ inline void StrToInts(int *pInts, int Num, const char *pStr)
|
|||
while(Num)
|
||||
{
|
||||
char aBuf[4] = {0,0,0,0};
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds" // false positive
|
||||
#endif
|
||||
for(int c = 0; c < 4 && pStr[Index]; c++, Index++)
|
||||
aBuf[c] = pStr[Index];
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
*pInts = ((aBuf[0]+128)<<24)|((aBuf[1]+128)<<16)|((aBuf[2]+128)<<8)|(aBuf[3]+128);
|
||||
pInts++;
|
||||
Num--;
|
||||
|
|
Loading…
Reference in a new issue