Am Sat, 2 Aug 2025 11:13:06 +0200
schrieb Scott Kostyshak <skost...@lyx.org>:

> On Sat, Aug 02, 2025 at 11:00:48AM +0200, Kornel Benko wrote:
> > Am Fri, 01 Aug 2025 14:30:47 +0000
> > schrieb Scott Kostyshak <skost...@lyx.org>:
> >   
> > > commit 6ee67ae6823ded6e486fe9f8496e27e371308ac4
> > > Author: Scott Kostyshak <skost...@lyx.org>
> > > Date:   Fri Aug 1 16:29:41 2025 +0200
> > > 
> > >     lyx-tester: turn on more GCC warnings
> > >     
> > >     These do not currently report any instances.
> > > ---
> > >  development/lyx-tester/lyxbuild | 10 ++++++++++
> > >  1 file changed, 10 insertions(+)
> > > 
> > > diff --git a/development/lyx-tester/lyxbuild 
> > > b/development/lyx-tester/lyxbuild
> > > index 31deb50949..cc059f8e5e 100755
> > > --- a/development/lyx-tester/lyxbuild
> > > +++ b/development/lyx-tester/lyxbuild
> > > @@ -685,6 +685,16 @@ else
> > >          # by default.
> > >          # https://reviews.llvm.org/D119361
> > >          CPPFLAGS+=";-Wno-missing-declarations"
> > > +
> > > +        CPPFLAGS+=";-Wno-defaulted-function-deleted"
> > > +        CPPFLAGS+=";-Wcomma-subscript"
> > > +        CPPFLAGS+=";-Wctor-dtor-privacy"
> > > +        CPPFLAGS+=";-Wdeprecated"
> > > +        CPPFLAGS+=";-Winvalid-imported-macros"
> > > +        CPPFLAGS+=";-Wmismatched-tags"
> > > +        CPPFLAGS+=";-Wsuggest-final-types"
> > > +        CPPFLAGS+=";-Wsuggest-final-methods"
> > > +        CPPFLAGS+=";-Wmaybe-uninitialized"
> > >        fi
> > >  
> > >        # Good candidates to clean up, but not urgent.  
> > 
> > There are really many files (~ 250) needed to check for 
> > -Wsuggest-final-types and
> > -Wsuggest-final-methods.  
> 
> For GCC? None of them trigger any warnings for me with GCC.
> 
> Scott

Yes, gcc14. The attached was needed for cmake build to compile.

        Kornel
diff --git a/3rdparty/hunspell/CMakeLists.txt b/3rdparty/hunspell/CMakeLists.txt
index c9b6315b13..d6ca5ca3b8 100644
--- a/3rdparty/hunspell/CMakeLists.txt
+++ b/3rdparty/hunspell/CMakeLists.txt
@@ -9,11 +9,11 @@ if (POLICY CMP0069)
   endif()
 endif()
 
 project(hunspell)
 
-handle_warning_options("hunspell" "CXX" -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-format-nonliteral -Wno-unused-macros)
+handle_warning_options("hunspell" "CXX" -Wno-suggest-final-types -Wno-suggest-final-methods -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-format-nonliteral -Wno-unused-macros)
 
 set(HUNSPELL_VERSION 1.7.0)
 
 set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${HUNSPELL_VERSION}/src)
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 10df6b2cee..04a3a4cfab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -72,10 +72,17 @@ foreach(_base Paragraph xml)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-deprecated-copy-with-dtor)
 endforeach()
 foreach(_base LayoutFile Paragraph xml)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+foreach(_base AspellChecker Buffer BufferEncodings BufferView Compare Converter ConverterCache
+	Cursor CursorSlice CutAndPaste DepTable DocIterator EnchantChecker Exporter Format
+	HunspellChecker InsetList MetricsInfo Mover Paragraph Row RowPainter Session Statistics
+	TexRow Text TextClass TextMetrics Thesaurus Undo VCBackend
+	buffer_funcs factory output_docbook output_latex output_xhtml xml)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+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)
 
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 047fa825f3..c7c6c0e5df 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -12,10 +12,13 @@ file(GLOB _lyxclient_sources ${TOP_SRC_DIR}/src/client/*.cpp)
 file(GLOB _lyxclient_headers ${TOP_SRC_DIR}/src/client/*.h)
 
 list(REMOVE_ITEM _lyxclient_headers "${TOP_SRC_DIR}/src/client/pch.h")
 list(REMOVE_ITEM _lyxclient_sources "${TOP_SRC_DIR}/src/client/lyxclient.cpp")
 handle_source_option("CXX" ${TOP_SRC_DIR}/src/client/client.cpp -Wno-implicit-int-float-conversion)
+foreach(_base client)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/client/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 include_directories(BEFORE
 	"${TOP_SRC_DIR}/src/client"
 	${ZLIB_INCLUDE_DIR})
 
 add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
diff --git a/src/frontends/qt/CMakeLists.txt b/src/frontends/qt/CMakeLists.txt
index a9ff52acbf..c71158c618 100644
--- a/src/frontends/qt/CMakeLists.txt
+++ b/src/frontends/qt/CMakeLists.txt
@@ -33,10 +33,27 @@ foreach(_base DialogFactory GuiApplication GuiCitation GuiImage GuiListings GuiN
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/frontends/qt/${_base}.cpp -Wno-deprecated-copy-with-user-provided-dtor)
 endforeach()
 foreach(_base GuiApplication GuiView)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/frontends/qt/${_base}.cpp -Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+foreach(_base Action BulletsModule CategorizedCombo ColorListWidget ColorsCombo CustomizedWidgets
+	Dialog DialogView DockView EmptyTable FancyLineEdit FindAndReplace FloatPlacement
+	GuiAbout GuiApplication GuiBibitem GuiBibtex GuiBox GuiBranch GuiBranches
+	GuiChanges GuiCharacter GuiCitation GuiClickableLabel GuiClipboard GuiCommandBuffer
+	GuiCommandEdit GuiCompare GuiCompareHistory GuiCompleter GuiCounter
+	GuiDelimiter GuiDialog GuiDocument GuiERT GuiErrorList GuiExternal
+	GuiFontMetrics GuiGraphics GuiHSpace GuiHyperlink GuiIdListModel GuiInclude GuiIndex
+	GuiIndices GuiInfo GuiInputMethod GuiLabel GuiLine GuiListings GuiLog GuiLyXFiles
+	GuiMathMatrix GuiNote GuiPainter GuiParagraph GuiPhantom GuiPrefs GuiPrintNomencl
+	GuiPrintindex GuiProgress GuiProgressView GuiRef GuiSearch GuiSelection GuiSelectionManager
+	GuiSendto GuiSetBorder GuiShowFile GuiSpellchecker GuiSymbols
+	GuiTabular GuiTabularCreate GuiTexinfo GuiThesaurus GuiToc GuiToolbar
+	GuiVSpace GuiView GuiViewSource GuiWorkArea GuiWrap
+	IconPalette InsertTableWidget InsetParamsDialog LayoutBox LengthCombo LyXFileDialog
+	Menus PanelStack TocModel TocWidget ToolTipFormatter Validator)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/frontends/qt/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt/${LYX_MOC_FILES})
 
 list(REMOVE_ITEM frontends_qt_sources ${moc_files} .)
 
 file(GLOB frontends_qt_headers ${TOP_SRC_DIR}/src/frontends/qt/${LYX_HPP_FILES})
diff --git a/src/graphics/CMakeLists.txt b/src/graphics/CMakeLists.txt
index 682b2f54a3..906fe08905 100644
--- a/src/graphics/CMakeLists.txt
+++ b/src/graphics/CMakeLists.txt
@@ -22,10 +22,13 @@ foreach(_base GraphicsCacheItem GraphicsLoader)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/graphics/${_base}.cpp -Wno-delete-abstract-non-virtual-dtor)
 endforeach()
 foreach(_base GraphicsConverter PreviewLoader)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/graphics/${_base}.cpp -Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+foreach(_base GraphicsCacheItem PreviewLoader)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/graphics/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 lyx_add_msvc_pch(graphics)
 
 include_directories(${TOP_SRC_DIR}/src/graphics)
 lyx_automoc(${TOP_SRC_DIR}/src/graphics/PreviewLoader.cpp)
 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES})
diff --git a/src/insets/CMakeLists.txt b/src/insets/CMakeLists.txt
index 3d0756f487..1d3b68cf8a 100644
--- a/src/insets/CMakeLists.txt
+++ b/src/insets/CMakeLists.txt
@@ -37,10 +37,21 @@ foreach(_base InsetArgument InsetBibitem InsetBox InsetBranch InsetCaption Inset
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/insets/${_base}.cpp -Wno-deprecated-copy-with-user-provided-dtor)
 endforeach()
 foreach(_base Inset InsetTabular)
   handle_source_option("CXX" ${TOP_SRC_DIR}/src/insets/${_base}.cpp -Wno-null-dereference)
 endforeach()
+foreach(_base Inset InsetArgument InsetBibitem InsetBibtex InsetBox InsetBranch InsetCaption
+	InsetCaptionable InsetCitation InsetCollapsible InsetCommand InsetCounter InsetERT
+	InsetExternal InsetFlex InsetFloat InsetFloatList InsetFoot InsetFootlike InsetGraphics
+	InsetHyperlink InsetIPA InsetIPAMacro InsetInclude InsetIndex InsetIndexMacro InsetInfo
+	InsetLabel InsetLine InsetListings InsetMarginal InsetNewline InsetNewpage
+	InsetNomencl InsetNote InsetPhantom InsetPreview InsetQuotes InsetRef
+	InsetScript InsetSeparator InsetSpace InsetSpecialChar
+	InsetTOC InsetTabular InsetText InsetVSpace InsetWrap
+	RenderGraphic RenderPreview)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/insets/${_base}.cpp -Wno-suggest-final-methods -Wno-suggest-final-types)
+endforeach()
 
 lyx_add_msvc_pch(insets)
 
 include_directories(${TOP_SRC_DIR}/src/insets ${QT_INCLUDES})
 
diff --git a/src/mathed/CMakeLists.txt b/src/mathed/CMakeLists.txt
index e477eb1683..6674b5fa69 100644
--- a/src/mathed/CMakeLists.txt
+++ b/src/mathed/CMakeLists.txt
@@ -29,10 +29,26 @@ foreach(_base  InsetMath InsetMathAMSArray InsetMathArray
   handle_source_option("CXX" ${TOP_SRC_DIR}/src/mathed/${_base}.cpp -Wno-shadow)
 endforeach()
 foreach(_base InsetMathMacro MathData MathRow)
   handle_source_option("CXX" ${TOP_SRC_DIR}/src/mathed/${_base}.cpp -Wno-null-dereference)
 endforeach()
+foreach(_base InsetMath InsetMathAMSArray InsetMathArray InsetMathBig InsetMathBoldSymbol InsetMathBox
+	InsetMathBrace InsetMathCancel InsetMathCancelto InsetMathCases InsetMathChar InsetMathClass
+	InsetMathColor InsetMathCommand InsetMathComment InsetMathDecoration InsetMathDelim InsetMathDiagram
+	InsetMathDiff InsetMathDots InsetMathEnsureMath InsetMathEnv InsetMathExFunc InsetMathExInt
+	InsetMathFont InsetMathFontOld InsetMathFrac InsetMathGrid InsetMathHull
+	InsetMathIntertext InsetMathKern InsetMathLefteqn InsetMathLim
+	InsetMathMacro InsetMathMacroArgument InsetMathMacroTemplate InsetMathMatrix
+	InsetMathNest InsetMathNumber InsetMathOverset InsetMathPar InsetMathPhantom
+	InsetMathRef InsetMathRoot InsetMathScript InsetMathSideset InsetMathSize
+	InsetMathSpace InsetMathSpecialChar InsetMathSplit InsetMathSqrt
+	InsetMathStackrel InsetMathString InsetMathSubstack InsetMathSymbol
+	InsetMathTabular InsetMathTextsize InsetMathUnderset InsetMathUnknown
+	InsetMathXArrow InsetMathXYMatrix MathData MathExtern
+	MathFactory MathParser MathRow MathStream MathSupport)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/mathed/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 
 include_directories(${TOP_SRC_DIR}/src/mathed ${QT_INCLUDES})
 
 if(NOT LYX_MERGE_FILES)
 	add_library(mathed ${library_type} ${mathed_sources} ${mathed_headers})
diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt
index fdaaf3061e..b84764724e 100644
--- a/src/support/CMakeLists.txt
+++ b/src/support/CMakeLists.txt
@@ -41,10 +41,13 @@ handle_source_option("CXX" ${TOP_SRC_DIR}/src/support/environment.cpp -Wno-unrea
 foreach(_base FileMonitor unicode)
   handle_source_option("CXX" ${TOP_SRC_DIR}/src/support/${_base}.cpp -Wno-shadow)
 endforeach()
 handle_source_option("CXX" ${TOP_SRC_DIR}/src/support/checksum.cpp -Wno-null-dereference)
 #handle_source_option("CXX" ${TOP_SRC_DIR}/src/support/ForkedCalls.cpp -Wno-delete-non-abstract-non-virtual-dtor)
+foreach(_base ConsoleApplication FileMonitor FileName Package Systemcall Timeout gzstream)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/support/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 if(NOT STD_STRING_USES_COW)
 	list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/trivstring.cpp)
 endif()
 
 if(APPLE)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 477fd1b10f..247f3dc4b1 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -128,10 +128,13 @@ foreach(_base TextClass)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-deprecated-copy-with-user-provided-dtor)
 endforeach()
 foreach(_base LayoutFile)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+foreach(_base TextClass)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 add_executable(check_ListingsCaption ${check_ListingsCaption_SOURCES})
 
 target_link_libraries(check_ListingsCaption support
 	${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QtCore5CompatLibrary})
 lyx_target_link_libraries(check_ListingsCaption Magic)
diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt
index 161b60f66d..9363489966 100644
--- a/src/tex2lyx/CMakeLists.txt
+++ b/src/tex2lyx/CMakeLists.txt
@@ -42,10 +42,13 @@ foreach(_base tex2lyx/Context tex2lyx/table tex2lyx/tex2lyx tex2lyx/text)
   handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-defaulted-function-deleted)
 endforeach()
 foreach(_base LayoutFile)
   #handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-delete-non-abstract-non-virtual-dtor)
 endforeach()
+foreach(_base TextClass tex2lyx/tex2lyx)
+  handle_source_option("CXX" ${TOP_SRC_DIR}/src/${_base}.cpp -Wno-suggest-final-types -Wno-suggest-final-methods)
+endforeach()
 
 file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES})
 
 include_directories(BEFORE
 	"${TOP_SRC_DIR}/src/tex2lyx"

Attachment: pgpaihL73UOJ9.pgp
Description: Digitale Signatur von OpenPGP

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to