Skip to content
Permalink
Browse files
Define DEFAULT_BUILTIN_UNREACHABLE for msvc to avoid warnings
  • Loading branch information
nyalldawson authored and github-actions committed Nov 4, 2021
1 parent 9c2613c commit 99640799d1660b92c5d966de4deca6ce57761116
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 9964079

Please sign in to comment.