equinor / segyio

Fast Python library for SEGY files.
Other
476 stars 214 forks source link

Avoid end of non-void warning in test.read-size #446

Closed jokva closed 4 years ago

jokva commented 4 years ago

The helper function will always return or invoke the FAIL() macro, but gcc under certain conditions complain:

segyio/lib/test/segy.cpp:534:1: warning: control reaches end of non-void function [-Wreturn-type]

If the macro for some reason is not expanded correctly and this does not abort, negative values should never pass a test for size and at least mark the error. When FAIL() does abort (it should), the final return is never reached.