2025-07-14 22:32 ftp://ftp.de.debian.org/debian/pool/main/m/moon-buggy/moon-buggy_1.0.51.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: a2600d0 (2025-07-14 12:39:20 +0200) count: 91 91 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: moon-buggy-1.0.51/error.c:32:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/cursor.c:17:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/cursor.c:27:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/date.c:57:13: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] moon-buggy-1.0.51/date.c:71:13: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] moon-buggy-1.0.51/ground.c:28:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/ground.c:48:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/date.c:55:14: style: Variable 'loctime' can be declared as pointer to const [constVariablePointer] moon-buggy-1.0.51/date.c:69:14: style: Variable 'loctime' can be declared as pointer to const [constVariablePointer] moon-buggy-1.0.51/game.c:54:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/buggy.c:72:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/buggy.c:85:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/buggy.c:116:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/buggy.c:133:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/game.c:159:35: style: Parameter 'client_data' can be declared as pointer to const. However it seems that 'print_lives_h' is a callback function, if 'client_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] moon-buggy-1.0.51/game.c:172:19: note: You might need to cast the function pointer here moon-buggy-1.0.51/game.c:159:35: note: Parameter 'client_data' can be declared as pointer to const moon-buggy-1.0.51/main.c:44:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/main.c:54:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/main.c:103:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/main.c:194:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/laser.c:42:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/laser.c:124:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/highscore.c:361:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IWUSR [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/highscore.c:416:46: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/highscore.c:547:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/highscore.c:625:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ERR [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/highscore.c:671:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/keyboard.c:139:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EINTR [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/keyboard.c:395:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/mode.c:27:3: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/mode.c:26:30: note: Assuming allocation function fails moon-buggy-1.0.51/mode.c:26:30: note: Assignment 'res=xmalloc(sizeof(struct mode))', assigned value is 0 moon-buggy-1.0.51/mode.c:27:3: note: Null pointer dereference moon-buggy-1.0.51/mode.c:28:3: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/mode.c:26:30: note: Assuming allocation function fails moon-buggy-1.0.51/mode.c:26:30: note: Assignment 'res=xmalloc(sizeof(struct mode))', assigned value is 0 moon-buggy-1.0.51/mode.c:28:3: note: Null pointer dereference moon-buggy-1.0.51/mode.c:29:3: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/mode.c:26:30: note: Assuming allocation function fails moon-buggy-1.0.51/mode.c:26:30: note: Assignment 'res=xmalloc(sizeof(struct mode))', assigned value is 0 moon-buggy-1.0.51/mode.c:29:3: note: Null pointer dereference moon-buggy-1.0.51/mode.c:31:3: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/mode.c:26:30: note: Assuming allocation function fails moon-buggy-1.0.51/mode.c:26:30: note: Assignment 'res=xmalloc(sizeof(struct mode))', assigned value is 0 moon-buggy-1.0.51/mode.c:31:3: note: Null pointer dereference moon-buggy-1.0.51/mode.c:32:3: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/mode.c:26:30: note: Assuming allocation function fails moon-buggy-1.0.51/mode.c:26:30: note: Assignment 'res=xmalloc(sizeof(struct mode))', assigned value is 0 moon-buggy-1.0.51/mode.c:32:3: note: Null pointer dereference moon-buggy-1.0.51/meteor.c:45:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/meteor.c:108:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/meteor.c:130:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/meteor.c:156:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/meteor.c:176:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/pager.c:48:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/laser.c:103:3: warning: If memory allocation fails, then there is a possible null pointer dereference: b [nullPointerOutOfMemory] moon-buggy-1.0.51/laser.c:102:15: note: Assuming allocation function fails moon-buggy-1.0.51/laser.c:102:15: note: Assignment 'b=xmalloc(sizeof(struct beam))', assigned value is 0 moon-buggy-1.0.51/laser.c:103:3: note: Null pointer dereference moon-buggy-1.0.51/laser.c:104:3: warning: If memory allocation fails, then there is a possible null pointer dereference: b [nullPointerOutOfMemory] moon-buggy-1.0.51/laser.c:102:15: note: Assuming allocation function fails moon-buggy-1.0.51/laser.c:102:15: note: Assignment 'b=xmalloc(sizeof(struct beam))', assigned value is 0 moon-buggy-1.0.51/laser.c:104:3: note: Null pointer dereference moon-buggy-1.0.51/laser.c:105:3: warning: If memory allocation fails, then there is a possible null pointer dereference: b [nullPointerOutOfMemory] moon-buggy-1.0.51/laser.c:102:15: note: Assuming allocation function fails moon-buggy-1.0.51/laser.c:102:15: note: Assignment 'b=xmalloc(sizeof(struct beam))', assigned value is 0 moon-buggy-1.0.51/laser.c:105:3: note: Null pointer dereference moon-buggy-1.0.51/laser.c:106:3: warning: If memory allocation fails, then there is a possible null pointer dereference: b [nullPointerOutOfMemory] moon-buggy-1.0.51/laser.c:102:15: note: Assuming allocation function fails moon-buggy-1.0.51/laser.c:102:15: note: Assignment 'b=xmalloc(sizeof(struct beam))', assigned value is 0 moon-buggy-1.0.51/laser.c:106:3: note: Null pointer dereference moon-buggy-1.0.51/laser.c:107:3: warning: If memory allocation fails, then there is a possible null pointer dereference: b [nullPointerOutOfMemory] moon-buggy-1.0.51/laser.c:102:15: note: Assuming allocation function fails moon-buggy-1.0.51/laser.c:102:15: note: Assignment 'b=xmalloc(sizeof(struct beam))', assigned value is 0 moon-buggy-1.0.51/laser.c:107:3: note: Null pointer dereference moon-buggy-1.0.51/meteor.c:92:3: warning: If memory allocation fails, then there is a possible null pointer dereference: m [nullPointerOutOfMemory] moon-buggy-1.0.51/meteor.c:91:15: note: Assuming allocation function fails moon-buggy-1.0.51/meteor.c:91:15: note: Assignment 'm=xmalloc(sizeof(struct meteor))', assigned value is 0 moon-buggy-1.0.51/meteor.c:92:3: note: Null pointer dereference moon-buggy-1.0.51/meteor.c:93:3: warning: If memory allocation fails, then there is a possible null pointer dereference: m [nullPointerOutOfMemory] moon-buggy-1.0.51/meteor.c:91:15: note: Assuming allocation function fails moon-buggy-1.0.51/meteor.c:91:15: note: Assignment 'm=xmalloc(sizeof(struct meteor))', assigned value is 0 moon-buggy-1.0.51/meteor.c:93:3: note: Null pointer dereference moon-buggy-1.0.51/meteor.c:30:30: style: Parameter 'm' can be declared as pointer to const [constParameterPointer] moon-buggy-1.0.51/persona.c:56:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable _SC_SAVED_IDS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/random.c:32:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RAND_MAX [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/level.c:480:14: style: Condition 'hole>0' is always false [knownConditionTrueFalse] moon-buggy-1.0.51/level.c:463:19: note: Assuming that condition 'hole>0' is not redundant moon-buggy-1.0.51/level.c:480:14: note: Condition 'hole>0' is always false moon-buggy-1.0.51/queue.c:96:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FD_SETSIZE [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/queue.c:170:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable F_GETFL [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/queue.c:362:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/realname.c:61:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLS [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:39:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_BLOCK [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:46:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_SETMASK [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:79:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:96:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_IGN [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:115:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/signal.c:126:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SIG_DFL [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/terminal.c:59:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IWGRP [valueFlowBailoutIncompleteVar] moon-buggy-1.0.51/title.c:42:7: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] moon-buggy-1.0.51/realname.c:41:32: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] moon-buggy-1.0.51/realname.c:65:7: portability: %d in format string (no. 1) requires 'int' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_sint] moon-buggy-1.0.51/realname.c:41:20: style: Variable 'my_passwd' can be declared as pointer to const [constVariablePointer] moon-buggy-1.0.51/queue.c:248:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ev [nullPointerOutOfMemory] moon-buggy-1.0.51/queue.c:247:16: note: Assuming allocation function fails moon-buggy-1.0.51/queue.c:247:16: note: Assignment 'ev=xmalloc(sizeof(struct event))', assigned value is 0 moon-buggy-1.0.51/queue.c:248:3: note: Null pointer dereference moon-buggy-1.0.51/queue.c:249:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ev [nullPointerOutOfMemory] moon-buggy-1.0.51/queue.c:247:16: note: Assuming allocation function fails moon-buggy-1.0.51/queue.c:247:16: note: Assignment 'ev=xmalloc(sizeof(struct event))', assigned value is 0 moon-buggy-1.0.51/queue.c:249:3: note: Null pointer dereference moon-buggy-1.0.51/queue.c:250:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ev [nullPointerOutOfMemory] moon-buggy-1.0.51/queue.c:247:16: note: Assuming allocation function fails moon-buggy-1.0.51/queue.c:247:16: note: Assignment 'ev=xmalloc(sizeof(struct event))', assigned value is 0 moon-buggy-1.0.51/queue.c:250:3: note: Null pointer dereference moon-buggy-1.0.51/queue.c:251:3: warning: If memory allocation fails, then there is a possible null pointer dereference: ev [nullPointerOutOfMemory] moon-buggy-1.0.51/queue.c:247:16: note: Assuming allocation function fails moon-buggy-1.0.51/queue.c:247:16: note: Assignment 'ev=xmalloc(sizeof(struct event))', assigned value is 0 moon-buggy-1.0.51/queue.c:251:3: note: Null pointer dereference moon-buggy-1.0.51/queue.c:188:29: style: Parameter 'client_data' can be declared as pointer to const. However it seems that 'dummy_h' is a callback function, if 'client_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] moon-buggy-1.0.51/queue.c:209:17: note: You might need to cast the function pointer here moon-buggy-1.0.51/queue.c:188:29: note: Parameter 'client_data' can be declared as pointer to const moon-buggy-1.0.51/queue.c:275:27: style: Parameter 'client_data' can be declared as pointer to const [constParameterPointer] moon-buggy-1.0.51/queue.c:346:34: style: Parameter 'client_data' can be declared as pointer to const [constParameterPointer] moon-buggy-1.0.51/highscore.c:82:30: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] moon-buggy-1.0.51/highscore.c:231:11: error: Width 32 given in format string (no. 3) is larger than destination buffer 'date[32]', use %31[^|] to prevent overflowing it. [invalidScanfFormatWidth] moon-buggy-1.0.51/highscore.c:521:5: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'int'. [invalidPrintfArgType_uint] moon-buggy-1.0.51/highscore.c:67:13: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/highscore.c:66:19: note: Assuming allocation function fails moon-buggy-1.0.51/highscore.c:66:19: note: Assignment 'res=xmalloc(strlen(dir)+1+strlen(name)+1)', assigned value is 0 moon-buggy-1.0.51/highscore.c:67:13: note: Null pointer dereference moon-buggy-1.0.51/highscore.c:68:13: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/highscore.c:66:19: note: Assuming allocation function fails moon-buggy-1.0.51/highscore.c:66:19: note: Assignment 'res=xmalloc(strlen(dir)+1+strlen(name)+1)', assigned value is 0 moon-buggy-1.0.51/highscore.c:68:13: note: Null pointer dereference moon-buggy-1.0.51/highscore.c:69:13: warning: If memory allocation fails, then there is a possible null pointer dereference: res [nullPointerOutOfMemory] moon-buggy-1.0.51/highscore.c:66:19: note: Assuming allocation function fails moon-buggy-1.0.51/highscore.c:66:19: note: Assignment 'res=xmalloc(strlen(dir)+1+strlen(name)+1)', assigned value is 0 moon-buggy-1.0.51/highscore.c:69:13: note: Null pointer dereference moon-buggy-1.0.51/highscore.c:302:18: warning: If resource allocation fails, then there is a possible null pointer dereference: score_file [nullPointerOutOfResources] moon-buggy-1.0.51/highscore.c:478:38: note: Assuming allocation function fails moon-buggy-1.0.51/highscore.c:478:38: note: Assignment 'f=fdopen(out_fd,"w")', assigned value is 0 moon-buggy-1.0.51/highscore.c:479:17: note: Calling function 'write_data', 1st argument 'f' value is 0 moon-buggy-1.0.51/highscore.c:302:18: note: Null pointer dereference moon-buggy-1.0.51/highscore.c:481:17: warning: If resource allocation fails, then there is a possible null pointer dereference: f [nullPointerOutOfResources] moon-buggy-1.0.51/highscore.c:478:38: note: Assuming allocation function fails moon-buggy-1.0.51/highscore.c:478:38: note: Assignment 'f=fdopen(out_fd,"w")', assigned value is 0 moon-buggy-1.0.51/highscore.c:481:17: note: Null pointer dereference moon-buggy-1.0.51/xstrdup.c:21:11: warning: If memory allocation fails, then there is a possible null pointer dereference: tmp [nullPointerOutOfMemory] moon-buggy-1.0.51/xstrdup.c:20:23: note: Assuming allocation function fails moon-buggy-1.0.51/xstrdup.c:20:23: note: Assignment 'tmp=xmalloc(strlen(str)+1)', assigned value is 0 moon-buggy-1.0.51/xstrdup.c:21:11: note: Null pointer dereference moon-buggy-1.0.51/highscore.c:82:18: style: Variable 'my_passwd' can be declared as pointer to const [constVariablePointer] moon-buggy-1.0.51/highscore.c:549:9: style: Variable 'limit' is assigned a value that is never used. [unreadVariable] moon-buggy-1.0.51/keyboard.c:62:6: warning: If memory allocation fails, then there is a possible null pointer dereference: *entry_p [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:61:24: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:61:24: note: Assignment '*entry_p=xmalloc(sizeof(struct hash_entry))', assigned value is 0 moon-buggy-1.0.51/keyboard.c:62:6: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:355:5: warning: If memory allocation fails, then there is a possible null pointer dereference: keys [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:353:18: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:353:18: note: Assignment 'keys=xmalloc(n*sizeof(struct key_info))', assigned value is 0 moon-buggy-1.0.51/keyboard.c:355:5: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:356:5: warning: If memory allocation fails, then there is a possible null pointer dereference: keys [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:353:18: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:353:18: note: Assignment 'keys=xmalloc(n*sizeof(struct key_info))', assigned value is 0 moon-buggy-1.0.51/keyboard.c:356:5: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:357:5: warning: If memory allocation fails, then there is a possible null pointer dereference: keys [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:353:18: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:353:18: note: Assignment 'keys=xmalloc(n*sizeof(struct key_info))', assigned value is 0 moon-buggy-1.0.51/keyboard.c:357:5: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:358:5: warning: If memory allocation fails, then there is a possible null pointer dereference: keys [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:353:18: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:353:18: note: Assignment 'keys=xmalloc(n*sizeof(struct key_info))', assigned value is 0 moon-buggy-1.0.51/keyboard.c:358:5: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:399:3: warning: If memory allocation fails, then there is a possible null pointer dereference: buffer [nullPointerOutOfMemory] moon-buggy-1.0.51/keyboard.c:397:20: note: Assuming allocation function fails moon-buggy-1.0.51/keyboard.c:397:20: note: Assignment 'buffer=xmalloc(max_len+1)', assigned value is 0 moon-buggy-1.0.51/keyboard.c:399:3: note: Null pointer dereference moon-buggy-1.0.51/keyboard.c:366:10: style: Variable 'name' can be declared as pointer to const [constVariablePointer] moon-buggy-1.0.51/keyboard.c:169:8: style: Unused variable: i [unusedVariable] diff: DONE