divvun / libdivvun

lib for running gramcheck and other pipelines + cli; modules for CG→spelling, CG→feedback, tagging blanks
https://giellalt.github.io/proof/gramcheck/GrammarCheckerDocumentation.html
GNU General Public License v3.0
9 stars 1 forks source link

withCasing() must return or throw #45

Closed TinoDidriksen closed 3 years ago

TinoDidriksen commented 3 years ago
I: Program returns random data in a function
E: libdivvun no-return-in-nonvoid-function suggest.hpp:158

Function withCasing() on https://github.com/divvun/libdivvun/blob/master/src/suggest.hpp#L144 must do something at the end. If it's never supposed to reach that, throw a dummy exception - even just throw 1 will do.

unhammer commented 3 years ago

Committed, though should it be possible to reach the end when compiled with -Werror=switch?