Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CompressedInputSource::CompressedInputSource(
- const String & file_path, const char * header,
- MemoryManager * const manager)
- : xercesc::InputSource(manager)
- {
- if (sizeof(header) / sizeof(char) > 1)
- {
- head_[0] = header[0];
- head_[1] = header[1];
- }
- else
- {
- head_[0] = '\0';
- head_[1] = '\0';
- }
- ....
- }
- This suspicious code was found in OpenMS project by PVS-Studio static code analyzer.
- Warning message is:
- V514 Dividing sizeof a pointer 'sizeof (header)' by another value. There is a probability of logical error presence. compressedinputsource.c 52
- 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