Merge pull request #8358

fb3f7ce clang warning fix for #8338 (Jeffrey Ryan)
This commit is contained in:
luigi1111 2022-07-03 17:28:13 -05:00
commit aa0b4fc7cc
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -44,12 +44,16 @@ reverse_bytes(signed char size, char *address){
char * first = address;
char * last = first + size - 1;
for(;first < last;++first, --last){
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow="
#endif
char x = *last;
*last = *first;
*first = x;
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
}
}