LibreCAD / LibreCAD_3

LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
http://librecad.org
Other
305 stars 102 forks source link

Failed to build: error: no return statement in function returning non-void #372

Open kevinsmia1939 opened 3 years ago

kevinsmia1939 commented 3 years ago

I failed to build on openSUSE 15.1 15.2 and Tumbleweed due to the error shown below. I download from master branch today.

Thanks.

[  243s] In file included from /home/abuild/rpmbuild/BUILD/LibreCAD_3-0.0+git20201220.b245f238/lcviewernoqt/painters/createpainter.cpp:4:
[  243s] /home/abuild/rpmbuild/BUILD/LibreCAD_3-0.0+git20201220.b245f238/lcviewernoqt/painters/lccairopainter.tcc: In member function 'lc::viewer::LcPainter* LcCairoPainter<T>::getCacherpainter()':
[  243s] /home/abuild/rpmbuild/BUILD/LibreCAD_3-0.0+git20201220.b245f238/lcviewernoqt/painters/lccairopainter.tcc:500:5: error: no return statement in function returning non-void [-Werror=return-type]
[  243s]   500 |     }
[  243s]       |     ^
[  243s] /home/abuild/rpmbuild/BUILD/LibreCAD_3-0.0+git20201220.b245f238/lcviewernoqt/painters/lccairopainter.tcc: In member function 'bool LcCairoPainter<T>::isEntityCached(long unsigned int)':
[  243s] /home/abuild/rpmbuild/BUILD/LibreCAD_3-0.0+git20201220.b245f238/lcviewernoqt/painters/lccairopainter.tcc:503:5: error: no return statement in function returning non-void [-Werror=return-type]
[  243s]   503 |     }
[  243s]       |     ^
[  243s] cc1plus: some warnings being treated as errors
feragon commented 3 years ago

What command have you used to compile LibreCAD? The defaults should not be strict on compiler warnings, neither compile the Cairo part

kevinsmia1939 commented 3 years ago

What command have you used to compile LibreCAD? The defaults should not be strict on compiler warnings, neither compile the Cairo part

I use open build service (OBS) to compile librecad. https://build.opensuse.org/package/show/home:andythe_great/LibreCAD_3

OBS add this flag to it by default. -Werror=return-type

I understand that it is minor issue, but I was recommended to report this as it is a good practice to fix this issue.