mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix warning caused by clang defining _GNUC_
This commit is contained in:
parent
f26a0c793e
commit
e6e5700ed6
@ -777,10 +777,14 @@ template<> bool p3FileDatabase::convertPointerToEntryIndex<4>(const void *p, Ent
|
||||
{
|
||||
// trust me, I can do this ;-)
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
e = EntryIndex( *reinterpret_cast<uint32_t*>(&p) & ENTRY_INDEX_BIT_MASK_32BITS ) ;
|
||||
friend_index = (*reinterpret_cast<uint32_t*>(&p)) >> NB_ENTRY_INDEX_BITS_32BITS ;
|
||||
#pragma GCC diagnostic pop
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
|
||||
if(friend_index == 0)
|
||||
{
|
||||
@ -817,10 +821,14 @@ template<> bool p3FileDatabase::convertPointerToEntryIndex<8>(const void *p, Ent
|
||||
{
|
||||
// trust me, I can do this ;-)
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
e = EntryIndex( *reinterpret_cast<uint64_t*>(&p) & ENTRY_INDEX_BIT_MASK_64BITS ) ;
|
||||
friend_index = (*reinterpret_cast<uint64_t*>(&p)) >> NB_ENTRY_INDEX_BITS_64BITS ;
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
|
||||
if(friend_index == 0)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
# define GCC_VERSION (__GNUC__*10000+__GNUC_MINOR__*100+__GNUC_PATCHLEVEL__)
|
||||
# if GCC_VERSION < 40700
|
||||
# define override
|
||||
@ -30,4 +30,4 @@
|
||||
# if GCC_VERSION < 40600
|
||||
# define nullptr NULL
|
||||
# endif // GCC_VERSION < 40600
|
||||
#endif //defined GNUC
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
|
Loading…
Reference in New Issue
Block a user