From 5559d71e88c6f11ad4a2f8eb21d89a40c17060fc Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Thu, 6 Feb 2020 09:29:07 +0000 Subject: [PATCH] Few warnings removed (MSVC). * Specific pragma warnings for GNU * Wrong struct/class forward declarations Change-Id: Ia797176a955ca698266ffcb9b60ac05c1cdc91b2 Signed-off-by: Victor Cebollada --- dali/internal/event/common/scene-impl.h | 2 +- dali/internal/event/events/gesture-recognizer.h | 2 +- .../event/events/rotation-gesture/rotation-gesture-detector-impl.h | 2 +- dali/public-api/common/dali-common.h | 6 ++++-- dali/public-api/math/math-utils.h | 4 ++++ dali/public-api/object/type-registry.h | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h index f9db963..01766df 100644 --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -35,7 +35,7 @@ namespace Dali namespace Integration { -class Event; +struct Event; } diff --git a/dali/internal/event/events/gesture-recognizer.h b/dali/internal/event/events/gesture-recognizer.h index 3c99c3e..8505191 100644 --- a/dali/internal/event/events/gesture-recognizer.h +++ b/dali/internal/event/events/gesture-recognizer.h @@ -36,7 +36,7 @@ struct TouchEvent; namespace Internal { -class GestureRequest; +struct GestureRequest; class Scene; template< typename T> diff --git a/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h b/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h index 0b8f17b..becfe0f 100644 --- a/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h +++ b/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h @@ -25,7 +25,7 @@ namespace Dali { -class RotationGesture; +struct RotationGesture; namespace Internal { diff --git a/dali/public-api/common/dali-common.h b/dali/public-api/common/dali-common.h index d5424f8..5b668f5 100755 --- a/dali/public-api/common/dali-common.h +++ b/dali/public-api/common/dali-common.h @@ -204,10 +204,12 @@ public: #endif /// Use DALI_FALLTHROUGH in switch statements where one case is supposed to fall through into another case +#define DALI_FALLTHROUGH +#if __GNUC__ #if __has_cpp_attribute(fallthrough) +#undef DALI_FALLTHROUGH #define DALI_FALLTHROUGH [[fallthrough]] -#else -#define DALI_FALLTHROUGH +#endif #endif #endif // DALI_COMMON_H diff --git a/dali/public-api/math/math-utils.h b/dali/public-api/math/math-utils.h index d91c198..55024c7 100644 --- a/dali/public-api/math/math-utils.h +++ b/dali/public-api/math/math-utils.h @@ -167,13 +167,17 @@ inline float GetRangedEpsilon( float a, float b ) * @param[in] value the value to compare * @return true if the value is equal to zero */ +#if __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif inline bool EqualsZero( float value ) { return value == 0.0f; } +#if __GNUC__ #pragma GCC diagnostic pop +#endif /** * @brief Helper function to compare equality of two floating point values. diff --git a/dali/public-api/object/type-registry.h b/dali/public-api/object/type-registry.h index cb84ba2..4964048 100644 --- a/dali/public-api/object/type-registry.h +++ b/dali/public-api/object/type-registry.h @@ -37,7 +37,7 @@ namespace Internal DALI_INTERNAL { class TypeRegistry; } -class DefaultPropertyMetadata; +struct DefaultPropertyMetadata; /** * @brief The TypeRegistry allows registration of type instance creation functions. -- 2.7.4