2022-06-23 10:46 ftp://ftp.de.debian.org/debian/pool/main/libx/libx86emu/libx86emu_3.5.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 -j1 platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 cppcheck: head 2.8 head-info: f1212e6 (2022-06-22 21:22:04 +0200) count: 64 64 elapsed-time: 203.6 253.2 head-timing-info: Tokenizer::simplifyTokens1: 66.6389s (avg. 8.32986s - 8 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 65.8444s (avg. 8.23055s - 8 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.395464s (avg. 0.049433s - 8 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.137517s (avg. 0.0171896s - 8 result(s)) Tokenizer::createTokens: 0.10805s (avg. 0.0135062s - 8 result(s)) Overall time: 133.548s old-timing-info: Tokenizer::simplifyTokens1: 82.9551s (avg. 10.3694s - 8 result(s)) Tokenizer::simplifyTokens1::ValueFlow: 82.133s (avg. 10.2666s - 8 result(s)) Tokenizer::simplifyTokens1::createSymbolDatabase: 0.422652s (avg. 0.0528315s - 8 result(s)) Tokenizer::simplifyTokens1::setValueType: 0.130005s (avg. 0.0162506s - 8 result(s)) Tokenizer::createTokens: 0.115589s (avg. 0.0144486s - 8 result(s)) Overall time: 166.218s head results: libx86emu-3.5/api.c:365:74: style: Parameter 'attr' can be declared as pointer to const [constParameter] libx86emu-3.5/api.c:365:53: style: Parameter 'data' can be declared as pointer to const [constParameter] libx86emu-3.5/decode.c:503:39: style:inconclusive: Function 'fetch_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:72:39: note: Function 'fetch_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:503:39: note: Function 'fetch_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:515:40: style:inconclusive: Function 'fetch_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:74:40: note: Function 'fetch_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:515:40: note: Function 'fetch_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:527:40: style:inconclusive: Function 'fetch_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:76:40: note: Function 'fetch_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:527:40: note: Function 'fetch_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:557:55: style:inconclusive: Function 'fetch_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:73:55: note: Function 'fetch_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:557:55: note: Function 'fetch_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:576:56: style:inconclusive: Function 'fetch_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:75:56: note: Function 'fetch_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:576:56: note: Function 'fetch_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:595:56: style:inconclusive: Function 'fetch_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:77:56: note: Function 'fetch_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:595:56: note: Function 'fetch_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:615:41: style:inconclusive: Function 'store_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:79:41: note: Function 'store_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:615:41: note: Function 'store_data_byte' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:629:41: style:inconclusive: Function 'store_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:81:41: note: Function 'store_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:629:41: note: Function 'store_data_word' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:643:41: style:inconclusive: Function 'store_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:83:41: note: Function 'store_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:643:41: note: Function 'store_data_long' argument 2 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:674:57: style:inconclusive: Function 'store_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:80:57: note: Function 'store_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:674:57: note: Function 'store_data_byte_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:692:57: style:inconclusive: Function 'store_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:82:57: note: Function 'store_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:692:57: note: Function 'store_data_word_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:710:57: style:inconclusive: Function 'store_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:84:57: note: Function 'store_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:710:57: note: Function 'store_data_long_abs' argument 3 names different: declaration 'offset' definition 'ofs'. libx86emu-3.5/decode.c:718:37: style:inconclusive: Function 'fetch_io_byte' argument 2 names different: declaration 'offset' definition 'port'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:86:37: note: Function 'fetch_io_byte' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:718:37: note: Function 'fetch_io_byte' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:728:38: style:inconclusive: Function 'fetch_io_word' argument 2 names different: declaration 'offset' definition 'port'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:87:38: note: Function 'fetch_io_word' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:728:38: note: Function 'fetch_io_word' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:738:38: style:inconclusive: Function 'fetch_io_long' argument 2 names different: declaration 'offset' definition 'port'. [funcArgNamesDifferent] libx86emu-3.5/include/decode.h:88:38: note: Function 'fetch_io_long' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:738:38: note: Function 'fetch_io_long' argument 2 names different: declaration 'offset' definition 'port'. libx86emu-3.5/decode.c:1847:15: style: Variable 'seg_name' can be declared as const array [constVariable] libx86emu-3.5/decode.c:546:10: error: Uninitialized variable: ret [uninitvar] libx86emu-3.5/decode.c:543:17: note: Assuming condition is false libx86emu-3.5/decode.c:546:10: note: Uninitialized variable: ret libx86emu-3.5/decode.c:2074:9: style: Variable 'err' is assigned a value that is never used. [unreadVariable] libx86emu-3.5/mem.c:311:34: style:inconclusive: Function 'vm_r_byte' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:46:41: note: Function 'vm_r_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:311:34: note: Function 'vm_r_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:335:41: style:inconclusive: Function 'vm_r_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:47:48: note: Function 'vm_r_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:335:41: note: Function 'vm_r_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:348:34: style:inconclusive: Function 'vm_r_word' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:48:41: note: Function 'vm_r_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:348:34: note: Function 'vm_r_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:383:35: style:inconclusive: Function 'vm_r_dword' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:49:42: note: Function 'vm_r_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:383:35: note: Function 'vm_r_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:423:34: style:inconclusive: Function 'vm_x_byte' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:50:41: note: Function 'vm_x_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:423:34: note: Function 'vm_x_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:447:34: style:inconclusive: Function 'vm_x_word' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:51:41: note: Function 'vm_x_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:447:34: note: Function 'vm_x_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:453:35: style:inconclusive: Function 'vm_x_dword' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:52:42: note: Function 'vm_x_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:453:35: note: Function 'vm_x_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:459:30: style:inconclusive: Function 'vm_w_byte' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:53:37: note: Function 'vm_w_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:459:30: note: Function 'vm_w_byte' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:480:37: style:inconclusive: Function 'vm_w_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:54:44: note: Function 'vm_w_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:480:37: note: Function 'vm_w_byte_noperm' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:494:30: style:inconclusive: Function 'vm_w_word' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:55:37: note: Function 'vm_w_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:494:30: note: Function 'vm_w_word' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:528:31: style:inconclusive: Function 'vm_w_dword' argument 1 names different: declaration 'vm' definition 'mem'. [funcArgNamesDifferent] libx86emu-3.5/mem.c:56:38: note: Function 'vm_w_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/mem.c:528:31: note: Function 'vm_w_dword' argument 1 names different: declaration 'vm' definition 'mem'. libx86emu-3.5/ops.c:1257:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1298:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1376:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1417:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1257:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/ops.c:1298:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/ops.c:1376:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/ops.c:1417:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/ops2.c:1458:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops2.c:1493:7: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops2.c:1458:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/ops2.c:1493:7: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/prim_ops.c:1488:21: style: Condition 'cnt<8' is always true [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1487:13: note: Assignment 'cnt=s%8', assigned value is less than 8 libx86emu-3.5/prim_ops.c:1488:21: note: Condition 'cnt<8' is always true libx86emu-3.5/prim_ops.c:1499:20: style: Condition 'cnt>=8' is always false [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1487:13: note: Assignment 'cnt=s%8', assigned value is less than 8 libx86emu-3.5/prim_ops.c:1499:20: note: Condition 'cnt>=8' is always false libx86emu-3.5/prim_ops.c:1528:21: style: Condition 'cnt<16' is always true [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1526:13: note: Assignment 'cnt=s%16', assigned value is less than 16 libx86emu-3.5/prim_ops.c:1528:21: note: Condition 'cnt<16' is always true libx86emu-3.5/prim_ops.c:1539:20: style: Condition 'cnt>=16' is always false [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1526:13: note: Assignment 'cnt=s%16', assigned value is less than 16 libx86emu-3.5/prim_ops.c:1539:20: note: Condition 'cnt>=16' is always false libx86emu-3.5/prim_ops.c:1568:21: style: Condition 'cnt<32' is always true [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1566:13: note: Assignment 'cnt=s%32', assigned value is less than 32 libx86emu-3.5/prim_ops.c:1568:21: note: Condition 'cnt<32' is always true libx86emu-3.5/prim_ops.c:1579:20: style: Condition 'cnt>=32' is always false [knownConditionTrueFalse] libx86emu-3.5/prim_ops.c:1566:13: note: Assignment 'cnt=s%32', assigned value is less than 32 libx86emu-3.5/prim_ops.c:1579:20: note: Condition 'cnt>=32' is always false libx86emu-3.5/prim_ops.c:1080:13: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1082. [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1082:11: note: Assuming that condition 'cnt!=1' is not redundant libx86emu-3.5/prim_ops.c:1080:13: note: Shift libx86emu-3.5/prim_ops.c:1241:3: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1342:16: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1340. [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1340:11: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1342:16: note: Shift libx86emu-3.5/prim_ops.c:1569:19: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1568. [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1568:10: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1569:19: note: Shift libx86emu-3.5/prim_ops.c:1646:16: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1644. [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1644:11: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1646:16: note: Shift libx86emu-3.5/prim_ops.c:2080:3: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:2148:3: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1080:13: warning: Either the condition 'cnt!=1' is redundant or there is signed integer overflow for expression '1<<(32-cnt)'. [integerOverflowCond] libx86emu-3.5/prim_ops.c:1082:11: note: Assuming that condition 'cnt!=1' is not redundant libx86emu-3.5/prim_ops.c:1080:13: note: Integer overflow libx86emu-3.5/prim_ops.c:1241:3: error: Signed integer overflow for expression '1<<31'. [integerOverflow] libx86emu-3.5/prim_ops.c:1342:16: warning: Either the condition 'cnt>0' is redundant or there is signed integer overflow for expression '1<<(32-cnt)'. [integerOverflowCond] libx86emu-3.5/prim_ops.c:1340:11: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1342:16: note: Integer overflow libx86emu-3.5/prim_ops.c:1569:19: warning: Either the condition 'cnt>0' is redundant or there is signed integer overflow for expression '1<<(32-cnt)'. [integerOverflowCond] libx86emu-3.5/prim_ops.c:1568:10: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1569:19: note: Integer overflow libx86emu-3.5/prim_ops.c:1646:16: warning: Either the condition 'cnt>0' is redundant or there is signed integer overflow for expression '1<<(32-cnt)'. [integerOverflowCond] libx86emu-3.5/prim_ops.c:1644:11: note: Assuming that condition 'cnt>0' is not redundant libx86emu-3.5/prim_ops.c:1646:16: note: Integer overflow libx86emu-3.5/prim_ops.c:2080:3: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/prim_ops.c:2148:3: error: Signed integer overflow for expression '1<<(32-1)'. [integerOverflow] libx86emu-3.5/test/x86test.c:446:5: warning: Return value of function asprintf() is not used. [ignoredReturnValue] diff: head libx86emu-3.5/api.c:365:53: style: Parameter 'data' can be declared as pointer to const [constParameter] 2.8 libx86emu-3.5/api.c:365:53: style: Parameter 'data' can be declared with const [constParameter] head libx86emu-3.5/api.c:365:74: style: Parameter 'attr' can be declared as pointer to const [constParameter] 2.8 libx86emu-3.5/api.c:365:74: style: Parameter 'attr' can be declared with const [constParameter] head libx86emu-3.5/decode.c:1847:15: style: Variable 'seg_name' can be declared as const array [constVariable] 2.8 libx86emu-3.5/decode.c:1847:15: style: Variable 'seg_name' can be declared with const [constVariable] DONE