Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Define DEFAULT_BUILTIN_UNREACHABLE for msvc to avoid warnings
  • Loading branch information
nyalldawson committed Nov 9, 2021
1 parent e35790d commit 5171194
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgis.h
Expand Up @@ -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 )
Expand Down

0 comments on commit 5171194

Please sign in to comment.