2026-05-05 22:14 ftp://ftp.de.debian.org/debian/pool/main/x/xmotd/xmotd_1.17.3b.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=motif --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 -j1 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: 6278f6b (2026-05-05 15:01:04 +0200) count: 37 37 elapsed-time: 0.2 0.1 head-timing-info: old-timing-info: head results: xmotd-1.17.3b-lite/atom.c:68:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable None [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/atom.c:59:8: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] xmotd-1.17.3b-lite/atom.c:56:18: style: Variable 'pw' can be declared as pointer to const [constVariablePointer] xmotd-1.17.3b-lite/atom.c:70:7: style: Variable 'xmotd' is assigned a value that is never used. [unreadVariable] xmotd-1.17.3b-lite/changed.c:56:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOENT [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/logo.c:87:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BitmapSuccess [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/logo.c:98:8: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] xmotd-1.17.3b-lite/logo.c:87:7: note: outer condition: rv!=BitmapSuccess xmotd-1.17.3b-lite/logo.c:98:8: note: identical inner condition: rv!=BitmapSuccess xmotd-1.17.3b-lite/main.c:488:1: portability: Omitted return type of function 'main' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] xmotd-1.17.3b-lite/main.c:608:1: portability: Omitted return type of function 'createWidgets' defaults to int, this is not supported by ISO C99 and later standards. [returnImplicitInt] xmotd-1.17.3b-lite/main.c:262:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ENOENT [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/main.c:391:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/main.c:492:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable String [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/main.c:623:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable formWidgetClass [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/main.c:258:6: style: Obsolescent function 'utime' called. It is recommended to use 'utimensat' instead. [prohibitedutimeCalled] xmotd-1.17.3b-lite/main.c:470:7: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] xmotd-1.17.3b-lite/main.c:470:11: error: Return value of allocation function 'open' is not stored. [leakReturnValNotUsed] xmotd-1.17.3b-lite/main.c:370:3: error: Memory leak: newmsg.file [memleak] xmotd-1.17.3b-lite/main.c:271:12: warning: Either the condition '(fp=fopen(motdfile,"w"))==NULL' is redundant or there is possible null pointer dereference: fp. [nullPointerRedundantCheck] xmotd-1.17.3b-lite/main.c:267:32: note: Assuming that condition '(fp=fopen(motdfile,"w"))==NULL' is not redundant xmotd-1.17.3b-lite/main.c:271:12: note: Null pointer dereference xmotd-1.17.3b-lite/main.c:246:23: style: Parameter 'motdfile' can be declared as pointer to const [constParameterPointer] xmotd-1.17.3b-lite/main.c:350:18: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] xmotd-1.17.3b-lite/main.c:390:20: style: Variable 'dp' can be declared as pointer to const [constVariablePointer] xmotd-1.17.3b-lite/main.c:458:12: style: Variable 'numsg' is assigned a value that is never used. [unreadVariable] xmotd-1.17.3b-lite/main.c:494:24: style: Variable 'start' is assigned a value that is never used. [unreadVariable] xmotd-1.17.3b-lite/main.c:494:16: style: Unused variable: i [unusedVariable] xmotd-1.17.3b-lite/main.c:720:8: style: Variable 'hline' is assigned a value that is never used. [unreadVariable] xmotd-1.17.3b-lite/main.c:610:16: style: Unused variable: paned [unusedVariable] xmotd-1.17.3b-lite/main.c:614:7: style: Unused variable: n [unusedVariable] xmotd-1.17.3b-lite/textmode.c:94:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/textmode.c:153:8: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition] xmotd-1.17.3b-lite/textmode.c:153:12: error: Return value of allocation function 'open' is not stored. [leakReturnValNotUsed] xmotd-1.17.3b-lite/textmode.c:50:14: style: Unused variable: onceAlready [unusedVariable] xmotd-1.17.3b-lite/usage.c:39:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/usage.c:36:7: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] xmotd-1.17.3b-lite/xmotd.c:128:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XtNlabel [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/xmotd.c:175:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable client_data [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/xmotd.c:263:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XtNstring [valueFlowBailoutIncompleteVar] xmotd-1.17.3b-lite/xmotd.c:235:24: style: Local variable 'app_con' shadows outer variable [shadowVariable] xmotd-1.17.3b-lite/xmotd.c:81:21: note: Shadowed declaration xmotd-1.17.3b-lite/xmotd.c:235:24: note: Shadow variable diff: DONE