Skip to content
Permalink
Browse files
Define DEFAULT_BUILTIN_UNREACHABLE for msvc to avoid warnings
  • Loading branch information
nyalldawson committed Nov 4, 2021
1 parent fa0ae4f commit eab080163d1c814ce4501bdff862a647b0eda0b9
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgis.h
@@ -1997,7 +1997,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 eab0801

Please sign in to comment.