Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RAMPREAL *readPeaks(RAMPFILE *pFI,
- ramp_fileoffset_t lScanIndex)
- {
- ...
- else
- {
- const char* pEndAttrValue;
- pEndAttrValue =
- strchr(pBeginData + strlen("contentType=\"") + 1, '\"');
- pEndAttrValue = '\0';
- fprintf(stderr, "%s Unsupported content type\n",
- pBeginData);
- return NULL;
- }
- ...
- }
- This is what should have been written here: *pEndAttrValue = '\0';
- This suspicious code was found in TPP project by PVS-Studio static code analyzer.
- Warning message is:
- V527 It is odd that the '\0' value is assigned to 'char' type pointer. Probably meant: *pEndAttrValue = '\0'. tpplib ramp.cpp 1856
- 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