Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const TCHAR* getQueryName() const;
- Query* MultiFieldQueryParser::parse(....)
- {
- ....
- Query* q = QueryParser::parse(query, fields[i], analyzer);
- if (q && (q->getQueryName() != _T("BooleanQuery")
- || ((BooleanQuery*)q)->getClauseCount() > 0)) {
- ....
- }
- This suspicious code was found in CLucene project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'q->getQueryName() != L"BooleanQuery"' is always true. To compare strings you should use wcscmp() function. multifieldqueryparser.cpp 44
- 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