Skip to content
Permalink
Browse files
Define DEFAULT_BUILTIN_UNREACHABLE for msvc to avoid warnings
  • Loading branch information
nyalldawson committed Nov 9, 2021
1 parent e35790d commit 5171194e555866997dca0d79a5e0a6bb90d99ad1
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgis.h
@@ -1809,7 +1809,11 @@ typedef unsigned long long qgssize;
#endif

#ifndef SIP_RUN
#if defined(__GNUC__) && !defined(__clang__)
#ifdef _MSC_VER
#define DEFAULT_BUILTIN_UNREACHABLE \
default: \
__assume(false);
#elif defined(__GNUC__) && !defined(__clang__)
// Workaround a GCC bug where a -Wreturn-type warning is emitted in constructs
// like:
// switch( mVariableThatCanOnlyBeXorY )

0 comments on commit 5171194

Please sign in to comment.