Merge pull request #8338

5858f05 GCC: Fix -Wstringop-overflow= warnings (Jeffrey Ryan)
This commit is contained in:
luigi1111 2022-05-26 21:25:30 -05:00
commit 72cba50458
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 3 additions and 0 deletions

View File

@ -44,9 +44,12 @@ reverse_bytes(signed char size, char *address){
char * first = address;
char * last = first + size - 1;
for(;first < last;++first, --last){
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow="
char x = *last;
*last = *first;
*first = x;
#pragma GCC diagnostic pop
}
}