Disable warning for false positive

This commit is contained in:
Dennis Felsing 2019-10-16 14:33:58 +02:00
parent 5b99e2c568
commit ae4f632bbd

View file

@ -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--;