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

Fix a warning #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix a warning #2

wants to merge 1 commit into from

Conversation

ebachard
Copy link

@ebachard ebachard commented Dec 23, 2021

[ 12%] Building CXX object CMakeFiles/prlib.dir/src/BlurDetection.cpp.o
$HOME/Devel/MATHS/PRLib/src/BlurDetection.cpp: In function ‘bool prl::isBlurred(const cv::Mat&, prl::BlurDetectionAlgo)’:
$HOME/Devel/MATHS/PRLib/src/BlurDetection.cpp:97:1: warning: control reaches end of non-void function [-Wreturn-type]
   97 | }

The warning is caused by nothing is returned once the right algo is found. I'd suggest to return false when no algo is found, thus a false value returned will help top detect a problem. And the warning will automaticaly vanish at build time, what cannot be bad :-)

Feel free to accept (or not) this little change under MIT license, (or whatever you need).

Thanks again for sharing your code !

With best regards,
Eric Bachard

The warning is caused by nothing is returned once the right algo is found. I'd suggest to return false when no algo is found, thus a false value returned will help top detect a problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant