mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 07:48:55 +00:00
clang warning fix for #8338
Unlike some other warnings, clang does not have a `stringop-overflow` group so it doesn't recognize the `#pragma GCC ...` directive in #8338
This commit is contained in:
parent
9750e1fa10
commit
fb3f7cebbf
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user