2022-06-25 08:10 ftp://ftp.de.debian.org/debian/pool/main/s/sphinxsearch/sphinxsearch_2.8.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j2 platform: Linux-5.4.0-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: 63e567e (2022-06-25 08:38:17 +0200) count: 169 162 elapsed-time: 40.3 48.8 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:299:10: style: The if condition is the same as the previous if condition [duplicateCondition] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:296:10: note: First condition manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:299:10: note: Second condition manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:316:10: style: The if condition is the same as the previous if condition [duplicateCondition] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:313:10: note: First condition manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:316:10: note: Second condition manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:162:36: warning: Either the condition '!res' is redundant or there is possible null pointer dereference: res. [nullPointerRedundantCheck] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:154:8: note: Assuming that condition '!res' is not redundant manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/test.c:162:36: note: Null pointer dereference manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1523:7: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:511:13: style: Condition 'cutoff>=0' is always true [knownConditionTrueFalse] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:497:65: note: Assuming condition 'cutoff<0' is false manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:511:13: note: Condition 'cutoff>=0' is always true manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:2422:36: warning: Either the condition '!attrs' is redundant or there is possible null pointer dereference: attrs. [nullPointerRedundantCheck] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:2413:13: note: Assuming that condition '!attrs' is not redundant manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:2422:36: note: Null pointer dereference manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1645:8: style: Variable 'sock' is reassigned a value before the old one has been used. [redundantAssignment] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1642:7: note: sock is assigned manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1645:8: note: sock is overwritten manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1548:9: style: Variable 'optval' is assigned a value that is never used. [unreadVariable] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1604:9: style: Variable 'optval' is assigned a value that is never used. [unreadVariable] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:1578:19: style: Unused variable: hp [unusedVariable] manticore-2.8.2-190402-4e81114-release/api/libsphinxclient/sphinxclient.c:2643:7: style: Variable 'pmax' is assigned a value that is never used. [unreadVariable] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1246:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:973:12: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:451:2: warning: Member variable 'CSphSEThreadTable::m_sQuery' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1266:14: warning: Member variable 'CSphSEQuery::m_sIndexWeight' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1266:14: warning: Member variable 'CSphSEQuery::m_iIndexWeight' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1266:14: warning: Member variable 'CSphSEQuery::m_sFieldWeight' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1266:14: warning: Member variable 'CSphSEQuery::m_iFieldWeight' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1266:14: warning: Member variable 'CSphSEQuery::m_sParseError' is not initialized in the constructor. [uninitMemberVar] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:623:30: performance:inconclusive: Technically the member function 'CSphSEQuery::ParseArray < uint32 >' can be static (but you may consider moving to unnamed namespace). [functionStatic] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1328:18: note: Technically the member function 'CSphSEQuery::ParseArray < uint32 >' can be static (but you may consider moving to unnamed namespace). manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:623:30: note: Technically the member function 'CSphSEQuery::ParseArray < uint32 >' can be static (but you may consider moving to unnamed namespace). manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:623:30: performance:inconclusive: Technically the member function 'CSphSEQuery::ParseArray < longlong >' can be static (but you may consider moving to unnamed namespace). [functionStatic] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1328:18: note: Technically the member function 'CSphSEQuery::ParseArray < longlong >' can be static (but you may consider moving to unnamed namespace). manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:623:30: note: Technically the member function 'CSphSEQuery::ParseArray < longlong >' can be static (but you may consider moving to unnamed namespace). manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:471:3: warning: Struct 'CSphTLS' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:471:3: warning: Struct 'CSphTLS' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1308:2: warning: Struct 'CSphSEQuery' does not have a copy constructor which is recommended since it has dynamic memory/resource allocation(s). [noCopyConstructor] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1308:2: warning: Struct 'CSphSEQuery' does not have a operator= which is recommended since it has dynamic memory/resource allocation(s). [noOperatorEq] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.h:52:6: style: Class 'ha_sphinx' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:451:2: style: Struct 'CSphSEThreadTable' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2295:31: warning: Either the condition 'pTable' is redundant or there is possible null pointer dereference: pTable. [nullPointerRedundantCheck] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2287:7: note: Assuming that condition 'pTable' is not redundant manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2295:31: note: Null pointer dereference manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:93:3: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:717:25: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:802:19: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:854:19: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1193:12: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1221:47: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1245:45: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2115:20: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2416:34: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2511:44: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2735:23: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2751:26: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2756:28: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2768:26: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2772:22: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2886:20: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2896:19: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:3063:21: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:3534:19: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:3596:20: style: C-style pointer casting [cstyleCast] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2210:7: style: The scope of the variable 'sError' can be reduced. [variableScope] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2050:36: style:inconclusive: Function 'ha_sphinx' argument 1 names different: declaration 'table_arg' definition 'table'. [funcArgNamesDifferent] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.h:52:30: note: Function 'ha_sphinx' argument 1 names different: declaration 'table_arg' definition 'table'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2050:36: note: Function 'ha_sphinx' argument 1 names different: declaration 'table_arg' definition 'table'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2125:39: style:inconclusive: Function 'Connect' argument 1 names different: declaration 'sQueryHost' definition 'sHost'. [funcArgNamesDifferent] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.h:148:32: note: Function 'Connect' argument 1 names different: declaration 'sQueryHost' definition 'sHost'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2125:39: note: Function 'Connect' argument 1 names different: declaration 'sQueryHost' definition 'sHost'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:3389:52: style:inconclusive: Function 'create' argument 2 names different: declaration 'form' definition 'table'. [funcArgNamesDifferent] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.h:125:45: note: Function 'create' argument 2 names different: declaration 'form' definition 'table'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:3389:52: note: Function 'create' argument 2 names different: declaration 'form' definition 'table'. manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1723:10: style: Local variable 'sName' shadows outer variable [shadowVariable] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1454:9: note: Shadowed declaration manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1723:10: note: Shadow variable manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1778:11: style: Local variable 'sValue' shadows outer variable [shadowVariable] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1418:9: note: Shadowed declaration manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:1778:11: note: Shadow variable manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2675:16: style: Local variable 'i' shadows outer variable [shadowVariable] manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2672:13: note: Shadowed declaration manticore-2.8.2-190402-4e81114-release/mysqlse/ha_sphinx.cc:2675:16: note: Shadow variable manticore-2.8.2-190402-4e81114-release/src/sphinxstd.h:4048:0: error: #error "Can't compile on system without atomic operations." [preprocessorErrorDirective] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:246:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:248:23: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:250:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:252:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:254:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:260:68: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:276:68: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:2137:62: style:inconclusive: Function 'http_parser_init' argument 2 names different: declaration 'type' definition 't'. [funcArgNamesDifferent] manticore-2.8.2-190402-4e81114-release/src/http/http_parser.h:288:66: note: Function 'http_parser_init' argument 2 names different: declaration 'type' definition 't'. manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:2137:62: note: Function 'http_parser_init' argument 2 names different: declaration 'type' definition 't'. manticore-2.8.2-190402-4e81114-release/src/json/cJSON.c:469:13: style: Condition 'newbuffer' is always true [knownConditionTrueFalse] manticore-2.8.2-190402-4e81114-release/src/json/cJSON.c:575:21: style: Condition '(value*0)!=0' is always false [knownConditionTrueFalse] manticore-2.8.2-190402-4e81114-release/src/json/cJSON.c:826:45: style: Condition '(input_end-input_pointer)<1' is always false [knownConditionTrueFalse] manticore-2.8.2-190402-4e81114-release/src/json/cJSON.c:816:26: note: Assuming that condition 'input_pointer() [syntaxError] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxquery.c:1045:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxquery.c:909:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxquery.c:1045:11: style: Variable 'yymsg' is assigned a value that is never used. [unreadVariable] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxselect.c:1240:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxselect.c:1104:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxselect.c:1240:11: style: Variable 'yymsg' is assigned a value that is never used. [unreadVariable] diff: head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxexpr.c:1090:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxexpr.c:1090:31: style: Parameter 'yyssp' can be declared with const [constParameter] head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxjson.c:824:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxjson.c:824:31: style: Parameter 'yyssp' can be declared with const [constParameter] head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxquery.c:909:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxquery.c:909:31: style: Parameter 'yyssp' can be declared with const [constParameter] head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxselect.c:1104:31: style: Parameter 'yyssp' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/bissphinxselect.c:1104:31: style: Parameter 'yyssp' can be declared with const [constParameter] head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/flexsphinxjson.c:1671:49: style: Parameter 'yybytes' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/flexsphinxjson.c:1671:49: style: Parameter 'yybytes' can be declared with const [constParameter] head /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/flexsphinxql.c:2925:48: style: Parameter 'yybytes' can be declared as pointer to const [constParameter] 2.8 /home/gitlab-runner/builds/ae04cf72/0/manticoresearch/dev/build/config/flexsphinxql.c:2925:48: style: Parameter 'yybytes' can be declared with const [constParameter] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:246:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:248:23: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:250:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:252:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:254:14: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:260:68: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] head manticore-2.8.2-190402-4e81114-release/src/http/http_parser.c:276:68: warning: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] DONE