From 7179ceddf0fdb18c8175c80cae651c1795c3e355 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 19 Sep 2021 13:36:15 +0300 Subject: [PATCH] Add -Wno-void-pointer-to-enum-cast (we use this hack in tests) Refs: https://reviews.llvm.org/D75758 --- CMakeLists.txt | 3 +++ configure.ac | 1 + 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6acf2414..fd01994a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,6 +295,9 @@ if (${GNUC}) -Wlogical-op -Wwrite-strings + + # we use this hack in tests + -Wno-void-pointer-to-enum-cast ) if (${CLANG}) diff --git a/configure.ac b/configure.ac index a68672be..4d4a3b2d 100644 --- a/configure.ac +++ b/configure.ac @@ -772,6 +772,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then dnl Disable warnings for unused paramaters AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], [CFLAGS="$CFLAGS -Wno-unused-parameter"],[],[-Werror]) + AX_CHECK_COMPILE_FLAG([-Wno-void-pointer-to-enum-cast], [CFLAGS="$CFLAGS -Wno-void-pointer-to-enum-cast"],[],[-Werror]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ #if !defined(__clang__)