Filosoft / vabamorf

Eesti keele morfanalüsaator
Other
24 stars 14 forks source link

Ambiguous nested if-else statement #14

Closed kristiank closed 9 years ago

kristiank commented 9 years ago

GMake reports a warning:

vabamorf/lib/etana/mrf-gen.cpp:800:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]
         if ( sl->Find(sl1) == -1) // see sõnaliik pole siin lubatud

The nested if-statement was hard for me to understand the correct way to interpret it. Perhaps the original code-writer can add the needed parenthesis for making it clear to understand for a future generation of code-watchers.

PRR24 commented 9 years ago

Vabamorf can be compiled with number of different compilers and different compilers output different number of different warnings. Dev team will not pay any special attention to the compiler warnings reported through the issue tracking system.