PVS-Studio. V531 It is odd that a sizeof() operator is multiplied by sizeof().
httprequestsender.cpp 286
BOOL CHttpRequestSender::InternalSend()
{
....
TCHAR szBuffer[1024]=_T("");
DWORD dwBuffSize = sizeof(szBuffer)*sizeof(TCHAR);
....
}
----
V547 Expression 'pos < 0' is always false. Unsigned type value is never < 0.
main.cpp 314
typedef std::basic_string<TCHAR> tstring;
int process_report(....)
{
....
tstring sInDirName;
....
size_t pos = sInDirName.rfind('\\');
if(pos<0) // There is no back slash in path
{
sInDirName = _T("");
sInFileName = szInput;
}
else
{
sInFileName = sInDirName.substr(pos+1);
sInDirName = sInDirName.substr(0, pos);
}
....
}
#add
PVS-Studio. V547 Expression 'pos < 0' is always false. Unsigned type value is
never < 0. main.cpp 352
PVS-Studio. V547 Expression 'pos >= 0' is always true. Unsigned type value is
always >= 0. main.cpp 837
PVS-Studio. V547 Expression 'pos >= 0' is always true. Unsigned type value is
always >= 0. minidumpreader.cpp 775
----
PVS-Studio Static Code Analyzer for C/C++/C++11 - http://www.viva64.com/
Original issue reported on code.google.com by karpov2...@gmail.com on 4 Oct 2013 at 1:19
Original issue reported on code.google.com by
karpov2...@gmail.com
on 4 Oct 2013 at 1:19