Skip to content

GCC Strict Step 000:(#37 partial fix) - removed warnings for current build settings; no extra warnings added

John Robertson requested to merge ergohack/dia:GCC-Strict-000 into master

Incremental progress towards GCC Strict (#37). There no changes to the build system; no increase in the warning level. Current build gives the following build warnings. Code changes remove or ignore the warnings below, providing a clean build on Linux. (msys2/mingw32 builds still show many warnings, which I believe will be addressed as I add the individual gcc warnings flags for the Linux build)

[523/550] Compiling C++ object plug-ins/wmf/libwmf_filter.so.p/wmf.cpp.o
../plug-ins/wmf/wmf.cpp:1546:24: warning: ‘emf_export_filter’ defined but not used [-Wunused-variable]
 1546 | static DiaExportFilter emf_export_filter = {
      |                        ^~~~~~~~~~~~~~~~~
[547/550] Compiling C++ object plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o
../plug-ins/pdf/pdf-import.cpp: In member function ‘virtual void DiaOutputDev::updateFont(GfxState*)’:
../plug-ins/pdf/pdf-import.cpp:347:24: warning: bitwise operation between different enumeration types ‘DiaFontFamily’ and ‘DiaFontSlant’ is deprecated [-Wdeprecated-enum-enum-conversion]
  346 |     DiaFontStyle style = (f->isSerif() ? DIA_FONT_SERIF : DIA_FONT_SANS)
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  347 |                        | (f->isItalic() ? DIA_FONT_ITALIC : DIA_FONT_NORMAL)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[548/550] Compiling C object plug-ins/libvdx_filter.so.p/vdx_vdx-xml.c.o
../plug-ins/vdx/vdx-xml.c: In function ‘vdx_write_object’:
../plug-ins/vdx/vdx-xml.c:3429:28: warning: variable ‘vdxText’ set but not used [-Wunused-but-set-variable]
 3429 |     const struct vdx_Text *vdxText;
      |                            ^~~~~~~
../plug-ins/vdx/vdx-xml.c:3422:30: warning: variable ‘vdxShapes’ set but not used [-Wunused-but-set-variable]
 3422 |     const struct vdx_Shapes *vdxShapes;
      |                              ^~~~~~~~~
[550/550] Linking target plug-ins/libvdx_filter.so
Edited by John Robertson

Merge request reports

Loading