commit 7ec5da8b2571b48f0ae727273f34e9e869cbe0c0
Author: Kornel Benko <[email protected]>
Date:   Mon Jul 21 09:58:29 2025 +0200

    Cmake build: turn off some warnings
    
    -Wunreachable-code-return for src/LyX.cpp
      clang warning:
            src/LyX.cpp:1245:9: warning: 'return' will never be executed 
[-Wunreachable-code-return]
                    return 0;
            src/LyX.cpp:1258:9: warning: 'return' will never be executed 
[-Wunreachable-code-return]
                    return 0;
    
    and -Wsuggest-destructor-override src/EnchantChecker.cpp
      clang warning:
            /usr/include/enchant-2/enchant++.h:55:12: error: '~Exception' 
overrides a destructor but is not marked 'override' 
[-Werror,-Wsuggest-destructor-override]
               55 |                         virtual ~Exception () noexcept {
                  |                                 ^
            
/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/exception.h:63:13:
 note: overridden virtual function is here
               63 |     virtual ~exception() _GLIBCXX_TXN_SAFE_DYN 
_GLIBCXX_NOTHROW;
                  |             ^
    since booth affected files are not part of to lyx-sources
---
 src/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ef7fd94e02..10df6b2cee 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,7 +41,7 @@ list(REMOVE_ITEM lyx_sources
        ${TOP_SRC_DIR}/src/lyxmathed.cpp)
 
 # -Wno-error needed, because gcc seems to ignore -Wno-missing-noreturn
-handle_source_option("CXX" "${TOP_SRC_DIR}/src/LyX.cpp" -Wno-invalid-noreturn 
-Wno-missing-noreturn -Wno-error)
+handle_source_option("CXX" "${TOP_SRC_DIR}/src/LyX.cpp" -Wno-error 
-Wno-invalid-noreturn -Wno-missing-noreturn -Wno-unreachable-code-return)
 handle_source_option("CXX" ${TOP_SRC_DIR}/src/TextMetrics.cpp 
-Wno-implicit-int-float-conversion)
 handle_source_option("CXX" ${TOP_SRC_DIR}/src/CursorSlice.cpp 
-Wno-null-dereference)
 
@@ -74,6 +74,7 @@ endforeach()
 foreach(_base LayoutFile Paragraph xml)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp 
-Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+handle_source_option("CXX" ${TOP_SRC_DIR}/src/EnchantChecker.cpp 
-Wno-suggest-destructor-override)
 list(REMOVE_ITEM lyx_headers
        ${TOP_SRC_DIR}/src/Variables.h
        ${TOP_SRC_DIR}/src/Section.h)
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to