NativeInstruments / ni-media

NI Media is a C++ library for reading and writing audio streams.
MIT License
235 stars 34 forks source link

Compiler warning in positioning.h #15

Closed wolfv closed 6 years ago

wolfv commented 6 years ago

/home/wolfv/Programs/ni-media/audiostream/src/ni/media/iostreams/positioning.h:35:14: warning: enumeration value '_S_ios_seekdir_end' not handled in switch [-Wswitch]

As it's the only warning and seems easy to solve, would be nice! :)

Foaly commented 6 years ago

Hmm I can't reproduce the warning using Clang Apple LLVM version 9.0.0 What compiler version + OS are you using?

wolfv commented 6 years ago

clang++ -v gives clang version 5.0.1 (tags/RELEASE_501/final) on Fedora 27

Foaly commented 6 years ago

From a quick google around this seems to be a compiler bug (more specifically in libstdc++). So a workaround would be to get rid of the switch, but I would say the proper solution is a compiler update :)

marcrambo commented 6 years ago

we could also simply add a default case which asserts and returns -1 (i.e.) eof.

marcrambo commented 6 years ago

Could not reproduce this warning but PR #19 should fix it. Also we added some checks on the CI in PR #20 so the code remains warning free. Thanks for reporting.