2024-03-28 15:26 ftp://ftp.de.debian.org/debian/pool/main/m/mxt-app/mxt-app_1.28.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --inline-suppr --disable=missingInclude --suppress=unmatchedSuppression --template=daca2 --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=valueFlowBailoutIncompleteVar -D__GNUC__ --platform=unix64 -j4 platform: Linux-6.1.0-0.deb11.6-amd64-x86_64-with-glibc2.31 python: 3.9.2 client-version: 1.3.45 compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110 cppcheck: head 2.13.0 head-info: 008884f (2024-03-28 10:36:15 +0100) count: 153 148 elapsed-time: 1.4 1.4 head-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 1.26308s (avg. 1.26308s - 1 result(s)) valueFlowUninit(tokenlist, errorLogger, settings): 0.726878s (avg. 0.242293s - 3 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.200238s (avg. 0.066746s - 3 result(s)) valueFlowSubFunction(tokenlist, symboldatabase, errorLogger, settings): 0.116428s (avg. 0.0388093s - 3 result(s)) valueFlowLifetime(tokenlist, errorLogger, settings): 0.090021s (avg. 0.0225053s - 4 result(s)) Overall time: 1.35481s old-timing-info: Tokenizer::simplifyTokens1::ValueFlow: 1.30075s (avg. 1.30075s - 1 result(s)) valueFlowUninit(tokenlist, settings): 0.806042s (avg. 0.268681s - 3 result(s)) valueFlowAfterAssign(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions): 0.147054s (avg. 0.049018s - 3 result(s)) valueFlowSubFunction(tokenlist, symboldatabase, errorLogger, *settings): 0.145688s (avg. 0.0485627s - 3 result(s)) valueFlowLifetime(tokenlist, errorLogger, settings): 0.111772s (avg. 0.027943s - 4 result(s)) Overall time: 1.36933s head results: mxt-app-1.28/src/jni/jniinterface.c:169:7: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/jni/jniinterface.c:252:15: style: Variable 'stringClass' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:119:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:171:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:101:66: style:inconclusive: Function 'i2c_dev_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.h:47:110: note: Function 'i2c_dev_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:101:66: note: Function 'i2c_dev_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:150:73: style:inconclusive: Function 'i2c_dev_write_register' argument 2 names different: declaration 'buf' definition 'val'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.h:48:73: note: Function 'i2c_dev_write_register' argument 2 names different: declaration 'buf' definition 'val'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:150:73: note: Function 'i2c_dev_write_register' argument 2 names different: declaration 'buf' definition 'val'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:151:55: style:inconclusive: Function 'i2c_dev_write_register' argument 4 names different: declaration 'count' definition 'datalength'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.h:48:105: note: Function 'i2c_dev_write_register' argument 4 names different: declaration 'count' definition 'datalength'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:151:55: note: Function 'i2c_dev_write_register' argument 4 names different: declaration 'count' definition 'datalength'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:216:49: style:inconclusive: Function 'i2c_dev_bootloader_write' argument 4 names different: declaration 'bytes_transferred' definition 'bytes_read'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.h:50:99: note: Function 'i2c_dev_bootloader_write' argument 4 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:216:49: note: Function 'i2c_dev_bootloader_write' argument 4 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:66:41: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:129:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:185:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:114:40: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:172:15: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:181:11: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:297:9: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/log.c:153:49: style:inconclusive: Function 'mxt_log_stderr' argument 4 names different: declaration 'args' definition 'va_args'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/log.h:61:104: note: Function 'mxt_log_stderr' argument 4 names different: declaration 'args' definition 'va_args'. mxt-app-1.28/src/libmaxtouch/log.c:153:49: note: Function 'mxt_log_stderr' argument 4 names different: declaration 'args' definition 'va_args'. mxt-app-1.28/src/libmaxtouch/log.c:73:62: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/log.h:66:38: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/libmaxtouch.c:511:66: style: Parameter 'msg' can be declared as pointer to const. However it seems that 'handle_calibrate_msg' is a callback function, if 'msg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] mxt-app-1.28/src/libmaxtouch/libmaxtouch.c:559:27: note: You might need to cast the function pointer here mxt-app-1.28/src/libmaxtouch/libmaxtouch.c:511:66: note: Parameter 'msg' can be declared as pointer to const mxt-app-1.28/src/libmaxtouch/info_block.c:152:7: style: Condition 'ret' is always false [knownConditionTrueFalse] mxt-app-1.28/src/libmaxtouch/info_block.c:137:7: note: Assuming that condition 'ret' is not redundant mxt-app-1.28/src/libmaxtouch/info_block.c:152:7: note: Condition 'ret' is always false mxt-app-1.28/src/libmaxtouch/info_block.c:229:3: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/info_block.c:229:3: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/info_block.c:129:3: error: Common realloc mistake: 'info_blk' nulled but not freed upon failure [memleakOnRealloc] mxt-app-1.28/src/libmaxtouch/info_block.c:103:44: style:inconclusive: Function 'mxt_read_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:271:44: note: Function 'mxt_read_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:103:44: note: Function 'mxt_read_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:176:44: style:inconclusive: Function 'mxt_calc_report_ids' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:272:44: note: Function 'mxt_calc_report_ids' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:176:44: note: Function 'mxt_calc_report_ids' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:224:49: style:inconclusive: Function 'mxt_get_firmware_version' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:278:49: note: Function 'mxt_get_firmware_version' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:224:49: note: Function 'mxt_get_firmware_version' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:240:47: style:inconclusive: Function 'mxt_display_chip_info' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:273:47: note: Function 'mxt_display_chip_info' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:240:47: note: Function 'mxt_display_chip_info' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:279:52: style:inconclusive: Function 'mxt_get_object_address' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:274:52: note: Function 'mxt_get_object_address' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:279:52: note: Function 'mxt_get_object_address' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:312:48: style:inconclusive: Function 'mxt_get_object_size' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:275:48: note: Function 'mxt_get_object_size' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:312:48: note: Function 'mxt_get_object_size' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:350:53: style:inconclusive: Function 'mxt_get_object_table_num' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:276:53: note: Function 'mxt_get_object_table_num' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:350:53: note: Function 'mxt_get_object_table_num' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:385:51: style:inconclusive: Function 'mxt_report_id_to_type' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/info_block.h:279:51: note: Function 'mxt_report_id_to_type' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:385:51: note: Function 'mxt_report_id_to_type' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/info_block.c:39:49: style: Parameter 'crc' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/info_block.c:224:49: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/info_block.c:281:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/info_block.c:331:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/info_block.c:352:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/msg.c:41:52: style:inconclusive: Function 't44_get_msg_count' argument 2 names different: declaration 'count' definition 'count_out'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/msg.h:31:52: note: Function 't44_get_msg_count' argument 2 names different: declaration 'count' definition 'count_out'. mxt-app-1.28/src/libmaxtouch/msg.c:41:52: note: Function 't44_get_msg_count' argument 2 names different: declaration 'count' definition 'count_out'. mxt-app-1.28/src/libmaxtouch/msg.c:157:74: style: Parameter 'flag' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/msg.c:214:66: style: Parameter 'msg' can be declared as pointer to const. However it seems that 'get_checksum_message' is a callback function, if 'msg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] mxt-app-1.28/src/libmaxtouch/msg.c:239:46: note: You might need to cast the function pointer here mxt-app-1.28/src/libmaxtouch/msg.c:214:66: note: Parameter 'msg' can be declared as pointer to const mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:149:20: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:219:20: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:259:20: portability: Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'. [prohibitedreaddirCalled] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:738:9: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:227:16: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:497:5: error: Resource leak: file [resourceLeak] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:345:13: warning: Either the condition '!mxt' is redundant or there is possible null pointer dereference: mxt. [nullPointerRedundantCheck] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:344:7: note: Assuming that condition '!mxt' is not redundant mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:345:13: note: Null pointer dereference mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:522:13: warning: Either the condition '!mxt' is redundant or there is possible null pointer dereference: mxt. [nullPointerRedundantCheck] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:521:7: note: Assuming that condition '!mxt' is not redundant mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:522:13: note: Null pointer dereference mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:701:13: warning: Either the condition '!mxt' is redundant or there is possible null pointer dereference: mxt. [nullPointerRedundantCheck] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:700:7: note: Assuming that condition '!mxt' is not redundant mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:701:13: note: Null pointer dereference mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:716:13: warning: Either the condition '!mxt' is redundant or there is possible null pointer dereference: mxt. [nullPointerRedundantCheck] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:715:7: note: Assuming that condition '!mxt' is not redundant mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:716:13: note: Null pointer dereference mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:366:67: style:inconclusive: Function 'sysfs_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.h:70:111: note: Function 'sysfs_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:366:67: note: Function 'sysfs_read_register' argument 5 names different: declaration 'bytes_transferred' definition 'bytes_read'. mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:121:48: style: Parameter 'i2c_dir' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:128:18: style: Variable 'pEntry' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/sysfs/sysfs_device.c:193:67: style: Parameter 'dir' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/sysfs/dmesg.c:257:15: warning: %hhx in format string (no. 1) requires 'unsigned char *' but the argument type is 'const char *'. [invalidScanfArgType_int] mxt-app-1.28/src/libmaxtouch/sysfs/dmesg.c:74:54: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:327:11: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:65:3: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:65:3: warning: %u in format string (no. 4) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:91:5: warning: %u in format string (no. 3) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:91:5: warning: %u in format string (no. 4) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:91:5: warning: %u in format string (no. 5) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:91:5: warning: %u in format string (no. 6) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:56:46: style:inconclusive: Function 'mxt_print_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/utilfuncs.h:33:46: note: Function 'mxt_print_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:56:46: note: Function 'mxt_print_info_block' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:123:40: style:inconclusive: Function 'mxt_read_object' argument 1 names different: declaration 'dev' definition 'mxt'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/utilfuncs.h:35:40: note: Function 'mxt_read_object' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:123:40: note: Function 'mxt_read_object' argument 1 names different: declaration 'dev' definition 'mxt'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:124:48: style:inconclusive: Function 'mxt_read_object' argument 4 names different: declaration 'offset' definition 'address'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/utilfuncs.h:35:94: note: Function 'mxt_read_object' argument 4 names different: declaration 'offset' definition 'address'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:124:48: note: Function 'mxt_read_object' argument 4 names different: declaration 'offset' definition 'address'. mxt-app-1.28/src/libmaxtouch/utilfuncs.c:62:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:321:14: style: Variable 'nowtm' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:236:33: warning: Uninitialized variable: databuf [uninitvar] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:226:17: note: Assuming condition is false mxt-app-1.28/src/libmaxtouch/utilfuncs.c:236:33: note: Uninitialized variable: databuf mxt-app-1.28/src/libmaxtouch/utilfuncs.c:202:21: style: Variable 'obj_addr' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:658:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:985:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:1000:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:789:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:789:9: warning: %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:859:56: style:inconclusive: Function 'usb_find_bus_devices' argument 2 names different: declaration 'device_list' definition 'found'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/usb/usb_device.h:77:56: note: Function 'usb_find_bus_devices' argument 2 names different: declaration 'device_list' definition 'found'. mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:859:56: note: Function 'usb_find_bus_devices' argument 2 names different: declaration 'device_list' definition 'found'. mxt-app-1.28/src/libmaxtouch/usb/usb_device.c:896:57: style: Parameter 'device_list' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bootloader.c:117:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/mxt-app/bootloader.c:258:9: warning: %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] mxt-app-1.28/src/mxt-app/bootloader.c:552:43: style:inconclusive: Function 'mxt_flash_firmware' argument 2 names different: declaration 'mxt' definition 'maxtouch'. [funcArgNamesDifferent] mxt-app-1.28/src/mxt-app/mxt_app.h:164:72: note: Function 'mxt_flash_firmware' argument 2 names different: declaration 'mxt' definition 'maxtouch'. mxt-app-1.28/src/mxt-app/bootloader.c:552:43: note: Function 'mxt_flash_firmware' argument 2 names different: declaration 'mxt' definition 'maxtouch'. mxt-app-1.28/src/mxt-app/bootloader.c:89:44: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bootloader.c:393:57: style: Parameter 'fw' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bootloader.c:80:7: style: struct member 'flash_context::bootloader_address' is never used. [unusedStructMember] mxt-app-1.28/src/mxt-app/bootloader.c:83:8: style: struct member 'flash_context::usb_bootloader' is never used. [unusedStructMember] mxt-app-1.28/src/mxt-app/bootloader.c:272:23: style: Variable 'cur_percent' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/bridge.c:611:12: style: Obsolescent function 'gethostbyname' called. It is recommended to use 'getaddrinfo' instead. [prohibitedgethostbynameCalled] mxt-app-1.28/src/mxt-app/bridge.c:624:3: style: Obsolescent function 'bzero' called. It is recommended to use 'memset' instead. [prohibitedbzeroCalled] mxt-app-1.28/src/mxt-app/bridge.c:626:3: style: Obsolescent function 'bcopy' called. It is recommended to use 'memcpy' or 'memmove' instead. [prohibitedbcopyCalled] mxt-app-1.28/src/mxt-app/bridge.c:665:3: style: Obsolescent function 'bzero' called. It is recommended to use 'memset' instead. [prohibitedbzeroCalled] mxt-app-1.28/src/mxt-app/bridge.c:620:5: error: Memory leak: bridge_ctx.sockfd [memleak] mxt-app-1.28/src/mxt-app/bridge.c:249:7: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/mxt-app/bridge.c:246:9: note: ret is assigned mxt-app-1.28/src/mxt-app/bridge.c:249:7: note: ret is overwritten mxt-app-1.28/src/mxt-app/bridge.c:490:9: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/mxt-app/bridge.c:489:9: note: ret is assigned mxt-app-1.28/src/mxt-app/bridge.c:490:9: note: ret is overwritten mxt-app-1.28/src/mxt-app/bridge.c:509:9: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/mxt-app/bridge.c:506:11: note: ret is assigned mxt-app-1.28/src/mxt-app/bridge.c:509:9: note: ret is overwritten mxt-app-1.28/src/mxt-app/bridge.c:520:9: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/mxt-app/bridge.c:516:11: note: ret is assigned mxt-app-1.28/src/mxt-app/bridge.c:520:9: note: ret is overwritten mxt-app-1.28/src/mxt-app/broken_line.c:271:7: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/mxt-app/broken_line.c:265:9: note: ret is assigned mxt-app-1.28/src/mxt-app/broken_line.c:271:7: note: ret is overwritten mxt-app-1.28/src/mxt-app/bridge.c:647:56: style:inconclusive: Function 'mxt_socket_server' argument 2 names different: declaration 'port' definition 'portno'. [funcArgNamesDifferent] mxt-app-1.28/src/mxt-app/mxt_app.h:165:56: note: Function 'mxt_socket_server' argument 2 names different: declaration 'port' definition 'portno'. mxt-app-1.28/src/mxt-app/bridge.c:647:56: note: Function 'mxt_socket_server' argument 2 names different: declaration 'port' definition 'portno'. mxt-app-1.28/src/mxt-app/broken_line.c:51:77: style: Parameter 'bl_opts' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/broken_line.c:80:37: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:105:75: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:156:74: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:214:74: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:258:55: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:302:79: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:326:82: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:404:76: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:424:52: style: Parameter 'bridge_ctx' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/bridge.c:605:19: style: Variable 'server' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/mxt-app/bridge.c:317:9: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/bridge.c:374:9: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/bridge.c:414:9: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/bridge.c:432:9: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/bridge.c:536:19: style: Variable 'debug_ng_fd' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/mxt-app/menu.c:55:7: error: Width 255 given in format string (no. 1) is larger than destination buffer 'cfg_file[255]', use %254s to prevent overflowing it. [invalidScanfFormatWidth] mxt-app-1.28/src/mxt-app/menu.c:77:7: error: Width 255 given in format string (no. 1) is larger than destination buffer 'cfg_file[255]', use %254s to prevent overflowing it. [invalidScanfFormatWidth] mxt-app-1.28/src/mxt-app/menu.c:98:7: error: Width 255 given in format string (no. 1) is larger than destination buffer 'fw_file[255]', use %254s to prevent overflowing it. [invalidScanfFormatWidth] mxt-app-1.28/src/mxt-app/polyfit.c:38:35: style: Parameter 'coeffs' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/polyfit.c:73:54: style: Parameter 'xdata' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/polyfit.c:73:69: style: Parameter 'ydata' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/self_cap.c:61:12: style: Variable 'cmd' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/mxt-app/diagnostic_data.c:117:5: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] mxt-app-1.28/src/mxt-app/diagnostic_data.c:159:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/mxt-app/diagnostic_data.c:435:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/mxt-app/mxt_app.c:510:9: warning:inconclusive: The buffer 'strbuf2' may not be null-terminated after the call to strncpy(). [terminateStrncpy] mxt-app-1.28/src/mxt-app/mxt_app.c:583:15: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/mxt-app/mxt_app.c:91:31: style: Parameter 'prog_name' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/mxt_app.c:234:26: style: Variable 'long_options' can be declared as const array [constVariable] mxt-app-1.28/src/test/run_unit_tests.c:40:1: error: syntax error [syntaxError] mxt-app-1.28/src/mxt-app/sensor_variant.c:104:70: style:inconclusive: Function 'check_line' argument 6 names different: declaration 'num_failed' definition 'total_failed'. [funcArgNamesDifferent] mxt-app-1.28/src/mxt-app/sensor_variant.h:56:132: note: Function 'check_line' argument 6 names different: declaration 'num_failed' definition 'total_failed'. mxt-app-1.28/src/mxt-app/sensor_variant.c:104:70: note: Function 'check_line' argument 6 names different: declaration 'num_failed' definition 'total_failed'. mxt-app-1.28/src/mxt-app/sensor_variant.c:52:28: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/sensor_variant.c:67:56: style: Parameter 'sv_opts' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/sensor_variant.c:133:65: style: Parameter 'sv_opts' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/mxt-app/sensor_variant.c:340:68: style: Parameter 'sv_opts' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/test/test_sensor_variant.c:196:10: style: Variable 'expected' can be declared as const array [constVariable] mxt-app-1.28/src/libmaxtouch/config.c:474:10: style: Condition '!file_read' is always true [knownConditionTrueFalse] mxt-app-1.28/src/libmaxtouch/config.c:460:19: note: Assignment 'file_read=0', assigned value is 0 mxt-app-1.28/src/libmaxtouch/config.c:469:10: note: Assuming condition is false mxt-app-1.28/src/libmaxtouch/config.c:474:10: note: Condition '!file_read' is always true mxt-app-1.28/src/libmaxtouch/config.c:412:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mxt-app-1.28/src/libmaxtouch/config.c:417:11: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mxt-app-1.28/src/libmaxtouch/config.c:425:13: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mxt-app-1.28/src/libmaxtouch/config.c:425:13: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] mxt-app-1.28/src/libmaxtouch/config.c:728:11: warning: %hhx in format string (no. 1) requires 'unsigned char *' but the argument type is 'const char *'. [invalidScanfArgType_int] mxt-app-1.28/src/libmaxtouch/config.c:494:9: warning: fscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/libmaxtouch/config.c:513:13: warning: fscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/libmaxtouch/config.c:519:11: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/libmaxtouch/config.c:527:9: warning: fscanf() without field width limits can crash with huge input data. [invalidscanf] mxt-app-1.28/src/libmaxtouch/config.c:996:9: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] mxt-app-1.28/src/libmaxtouch/config.c:992:7: note: ret is assigned mxt-app-1.28/src/libmaxtouch/config.c:996:9: note: ret is overwritten mxt-app-1.28/src/libmaxtouch/config.c:841:62: style:inconclusive: Function 'mxt_load_config_file' argument 2 names different: declaration 'cfg_file' definition 'filename'. [funcArgNamesDifferent] mxt-app-1.28/src/libmaxtouch/libmaxtouch.h:197:62: note: Function 'mxt_load_config_file' argument 2 names different: declaration 'cfg_file' definition 'filename'. mxt-app-1.28/src/libmaxtouch/config.c:841:62: note: Function 'mxt_load_config_file' argument 2 names different: declaration 'cfg_file' definition 'filename'. mxt-app-1.28/src/libmaxtouch/config.c:297:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:362:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:818:9: style: Variable 'extension' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:860:9: style: Variable 'extension' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:885:23: style: Variable 'id' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:918:77: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] mxt-app-1.28/src/libmaxtouch/config.c:954:26: style: Variable 'object' can be declared as pointer to const [constVariablePointer] mxt-app-1.28/src/libmaxtouch/config.c:116:34: style: Variable 'next' is assigned a value that is never used. [unreadVariable] mxt-app-1.28/src/libmaxtouch/config.c:435:7: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] diff: head mxt-app-1.28/src/libmaxtouch/hidraw/hidraw_device.c:114:40: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] head mxt-app-1.28/src/libmaxtouch/i2c_dev/i2c_dev_device.c:66:41: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] head mxt-app-1.28/src/libmaxtouch/log.h:66:38: style: Parameter 'ctx' can be declared as pointer to const [constParameterPointer] head mxt-app-1.28/src/libmaxtouch/utilfuncs.c:236:33: warning: Uninitialized variable: databuf [uninitvar] mxt-app-1.28/src/libmaxtouch/utilfuncs.c:226:17: note: Assuming condition is false mxt-app-1.28/src/libmaxtouch/utilfuncs.c:236:33: note: Uninitialized variable: databuf head mxt-app-1.28/src/mxt-app/bootloader.c:89:44: style: Parameter 'mxt' can be declared as pointer to const [constParameterPointer] DONE