diff options
author | Jeffrey Ryan <jeffreyryan@tutanota.com> | 2022-05-27 19:48:59 -0500 |
---|---|---|
committer | Jeffrey Ryan <jeffreyryan@tutanota.com> | 2022-05-27 20:27:46 -0500 |
commit | fb3f7cebbfc3d41a4186d5f7560dd7f7769517bb (patch) | |
tree | a6c7d8407696f910e8e8518c7d028404ed092fe8 /external | |
parent | Merge pull request #8340 (diff) | |
download | monero-fb3f7cebbfc3d41a4186d5f7560dd7f7769517bb.tar.xz |
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
Diffstat (limited to 'external')
-rw-r--r-- | external/boost/archive/portable_binary_archive.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/external/boost/archive/portable_binary_archive.hpp b/external/boost/archive/portable_binary_archive.hpp index cdbd38aad..b1d6ae73e 100644 --- a/external/boost/archive/portable_binary_archive.hpp +++ b/external/boost/archive/portable_binary_archive.hpp @@ -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
}
}
|