2025-07-01 03:03 ftp://ftp.de.debian.org/debian/pool/main/t/tds-fdw/tds-fdw_2.0.4.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j6 platform: Linux-6.1.0-37-amd64-x86_64-with-glibc2.36 python: 3.11.2 client-version: 1.3.67 compiler: g++ (Debian 12.2.0-14+deb12u1) 12.2.0 cppcheck: head 2.17.0 head-info: dfa16af (2025-06-30 19:43:56 +0200) count: 87 87 elapsed-time: 0.4 0.4 head-timing-info: old-timing-info: head results: tds_fdw-2.0.4/src/options.c:122:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ForeignServerRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:236:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ForeignServerRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:477:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ForeignServerRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:555:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ForeignTableRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:678:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable UserMappingRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:739:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/options.c:872:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:214:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:236:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable OperatorRelationId [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:276:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable InvalidOid [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:338:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable InvalidOid [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:749:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NoLock [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:795:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:881:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1058:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FirstLowInvalidHeapAttributeNumber [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1100:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BLCKSZ [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1120:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1276:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ESCAPE_STRING_SYNTAX [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1354:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1588:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Var [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1641:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COERCE_IMPLICIT_CAST [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1731:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1769:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NAMEDATALEN [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1840:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1940:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IS_NULL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:1971:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:2054:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BTLessStrategyNumber [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:155:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FdwRoutine [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:223:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PGC_SUSET [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:375:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CMD_UPDATE [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:447:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:520:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DEBUG3 [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:599:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBVERSION_UNKNOWN [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:792:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FAIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:1059:50: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FAIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:1301:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYBCHAR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:1420:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FAIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:1507:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:1709:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DBTEXTSIZE [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2057:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NO_MORE_ROWS [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2108:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2182:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2410:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TdsFdwRelationInfo [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2577:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:2960:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:3081:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FAIL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:4086:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INT_CANCEL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:4097:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERROR [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:4156:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/tds_fdw.c:4167:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INT_CANCEL [valueFlowBailoutIncompleteVar] tds_fdw-2.0.4/src/deparse.c:906:3: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] tds_fdw-2.0.4/src/deparse.c:941:8: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:936:11: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:941:8: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:954:8: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:951:11: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:954:8: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:1003:7: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:998:10: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:1003:7: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:1202:14: style: Condition 'colname==NULL' is always true [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:1172:21: note: Assignment 'colname=NULL', assigned value is 0 tds_fdw-2.0.4/src/deparse.c:1191:43: note: Assuming condition is false tds_fdw-2.0.4/src/deparse.c:1202:14: note: Condition 'colname==NULL' is always true tds_fdw-2.0.4/src/deparse.c:1694:7: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:1691:10: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:1694:7: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:1918:7: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:1915:10: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:1918:7: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:1963:7: style: Condition '!first' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/deparse.c:1953:16: note: Assignment 'first=true', assigned value is 1 tds_fdw-2.0.4/src/deparse.c:1963:7: note: Condition '!first' is always false tds_fdw-2.0.4/src/deparse.c:951:9: style: Variable 'first' is reassigned a value before the old one has been used. [redundantAssignment] tds_fdw-2.0.4/src/deparse.c:943:10: note: first is assigned tds_fdw-2.0.4/src/deparse.c:951:9: note: first is overwritten tds_fdw-2.0.4/src/deparse.c:1300:19: style:inconclusive: Function 'deparseExpr' argument 1 names different: declaration 'expr' definition 'node'. [funcArgNamesDifferent] tds_fdw-2.0.4/src/deparse.c:150:31: note: Function 'deparseExpr' argument 1 names different: declaration 'expr' definition 'node'. tds_fdw-2.0.4/src/deparse.c:1300:19: note: Function 'deparseExpr' argument 1 names different: declaration 'expr' definition 'node'. tds_fdw-2.0.4/src/deparse.c:350:14: style: Variable 'var' can be declared as pointer to const [constVariablePointer] tds_fdw-2.0.4/src/deparse.c:431:15: style: Variable 'p' can be declared as pointer to const [constVariablePointer] tds_fdw-2.0.4/src/deparse.c:788:23: style: Parameter 'option_set' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/deparse.c:1115:11: style: Variable 'colname' can be declared as pointer to const [constVariablePointer] tds_fdw-2.0.4/src/deparse.c:1172:11: style: Variable 'colname' can be declared as pointer to const [constVariablePointer] tds_fdw-2.0.4/src/deparse.c:1420:45: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/deparse.c:1986:24: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/deparse.c:2012:27: style: Parameter 'context' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/deparse.c:1491:15: style: Variable 'isfloat' is assigned a value that is never used. [unreadVariable] tds_fdw-2.0.4/src/tds_fdw.c:1463:54: style: Condition 'tdsSetupConnection(&option_set,login,&dbproc)!=0' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/tds_fdw.c:1463:24: note: Calling function 'tdsSetupConnection' returns 0 tds_fdw-2.0.4/src/tds_fdw.c:1463:54: note: Condition 'tdsSetupConnection(&option_set,login,&dbproc)!=0' is always false tds_fdw-2.0.4/src/tds_fdw.c:1601:9: style: Condition '!local_name' is always true [knownConditionTrueFalse] tds_fdw-2.0.4/src/tds_fdw.c:1568:24: note: Assignment 'local_name=NULL', assigned value is 0 tds_fdw-2.0.4/src/tds_fdw.c:1587:7: note: Assuming condition is false tds_fdw-2.0.4/src/tds_fdw.c:1601:9: note: Condition '!local_name' is always true tds_fdw-2.0.4/src/tds_fdw.c:2281:54: style: Condition 'tdsSetupConnection(option_set,login,&dbproc)!=0' is always false [knownConditionTrueFalse] tds_fdw-2.0.4/src/tds_fdw.c:2281:25: note: Calling function 'tdsSetupConnection' returns 0 tds_fdw-2.0.4/src/tds_fdw.c:2281:54: note: Condition 'tdsSetupConnection(option_set,login,&dbproc)!=0' is always false tds_fdw-2.0.4/src/tds_fdw.c:1875:7: style: Local variable 'ncol' shadows outer variable [shadowVariable] tds_fdw-2.0.4/src/tds_fdw.c:1686:6: note: Shadowed declaration tds_fdw-2.0.4/src/tds_fdw.c:1875:7: note: Shadow variable tds_fdw-2.0.4/src/tds_fdw.c:558:8: style: Variable 'servers' can be declared as pointer to const [constVariablePointer] tds_fdw-2.0.4/src/tds_fdw.c:1207:43: style: Parameter 'option_set' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/tds_fdw.c:1492:68: style: Parameter 'option_set' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/tds_fdw.c:2545:54: style: Parameter 'baserel' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/tds_fdw.c:2932:71: style: Parameter 'func' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/tds_fdw.c:2932:90: style: Parameter 'totalpages' can be declared as pointer to const [constParameterPointer] tds_fdw-2.0.4/src/tds_fdw.c:4127:42: style: Parameter 'dbproc' can be declared as pointer to const. However it seems that 'tds_blackhole_msg_handler' is a callback function, if 'dbproc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:2256:17: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4127:42: note: Parameter 'dbproc' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:4127:97: style: Parameter 'msgtext' can be declared as pointer to const. However it seems that 'tds_blackhole_msg_handler' is a callback function, if 'msgtext' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:2256:17: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4127:97: note: Parameter 'msgtext' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:4127:112: style: Parameter 'svr_name' can be declared as pointer to const. However it seems that 'tds_blackhole_msg_handler' is a callback function, if 'svr_name' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:2256:17: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4127:112: note: Parameter 'svr_name' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:4127:128: style: Parameter 'proc_name' can be declared as pointer to const. However it seems that 'tds_blackhole_msg_handler' is a callback function, if 'proc_name' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:2256:17: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4127:128: note: Parameter 'proc_name' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:4154:28: style: Parameter 'vdbproc' can be declared as pointer to const. However it seems that 'tds_chkintr_func' is a callback function, if 'vdbproc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:739:26: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4154:28: note: Parameter 'vdbproc' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:4164:29: style: Parameter 'vdbproc' can be declared as pointer to const. However it seems that 'tds_hndlintr_func' is a callback function, if 'vdbproc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] tds_fdw-2.0.4/src/tds_fdw.c:739:44: note: You might need to cast the function pointer here tds_fdw-2.0.4/src/tds_fdw.c:4164:29: note: Parameter 'vdbproc' can be declared as pointer to const tds_fdw-2.0.4/src/tds_fdw.c:544:11: style: Variable 'erc' is assigned a value that is never used. [unreadVariable] tds_fdw-2.0.4/src/tds_fdw.c:747:12: style: Variable 'erc' is assigned a value that is never used. [unreadVariable] diff: DONE