Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int sf_error (SNDFILE *sndfile)
- {
- ...
- if (! sndfile)
- {
- if (sf_error != 0)
- return sf_errno ;
- return 0 ;
- } ;
- ...
- }
- Strange code. Perhaps there should be (sf_errno != 0). But why not simply write "return sf_errno;" then?
- This suspicious code was found in Audacity project by PVS-Studio static code analyzer.
- Warning message is:
- V516 Consider inspecting an odd expression. Non-null function pointer is compared to null: 'sf_error != 0'. libsndfile sndfile.c 491
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement