Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevinsmia1939 opened this issue Dec 23, 2020 · 2 comments

Comments

@kevinsmia1939
Copy link

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
Copy link
Member

feragon commented Dec 26, 2020

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

@kevinsmia1939
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants