2025-05-06 01:55 ftp://ftp.de.debian.org/debian/pool/main/libx/libx86emu/libx86emu_3.5.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 -j3 platform: Linux-6.8.0-1022-oracle-aarch64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 cppcheck: head 2.17.0 head-info: 581f101 (2025-05-05 21:13:30 +0200) count: 129 129 elapsed-time: 4.1 4.2 head-timing-info: old-timing-info: head results: libx86emu-3.5/demo/x86emu-demo.c:54:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable opterr [valueFlowBailoutIncompleteVar] libx86emu-3.5/demo/x86emu-demo.c:127:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] libx86emu-3.5/demo/x86emu-demo.c:136:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable X86EMU_PERM_R [valueFlowBailoutIncompleteVar] libx86emu-3.5/demo/x86emu-demo.c:175:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] libx86emu-3.5/demo/x86emu-demo.c:191:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable X86EMU_RUN_MAX_INSTR [valueFlowBailoutIncompleteVar] libx86emu-3.5/demo/x86emu-demo.c:123:37: style: Parameter 'buf' can be declared as pointer to const. However it seems that 'flush_log' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libx86emu-3.5/demo/x86emu-demo.c:139:32: note: You might need to cast the function pointer here libx86emu-3.5/demo/x86emu-demo.c:123:37: note: Parameter 'buf' can be declared as pointer to const libx86emu-3.5/demo/x86emu-demo.c:150:35: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/mem.c:91:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pdir [valueFlowBailoutIncompleteVar] libx86emu-3.5/mem.c:119:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pdir [valueFlowBailoutIncompleteVar] libx86emu-3.5/mem.c:153:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pdir [valueFlowBailoutIncompleteVar] libx86emu-3.5/mem.c:199:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pdir [valueFlowBailoutIncompleteVar] libx86emu-3.5/api.c:432:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable pdir [valueFlowBailoutIncompleteVar] libx86emu-3.5/mem.c:83:3: warning: If memory allocation fails, then there is a possible null pointer dereference: mem [nullPointerOutOfMemory] libx86emu-3.5/mem.c:82:15: note: Assuming allocation function fails libx86emu-3.5/mem.c:82:15: note: Assignment 'mem=calloc(1,sizeof(*mem))', assigned value is 0 libx86emu-3.5/mem.c:83:3: note: Null pointer dereference libx86emu-3.5/mem.c:217:9: warning: If memory allocation fails, then there is a possible null pointer dereference: ptable [nullPointerOutOfMemory] libx86emu-3.5/mem.c:214:40: note: Assuming allocation function fails libx86emu-3.5/mem.c:214:32: note: Assignment 'ptable=(*pdir)[pdir_idx]=calloc(1,sizeof(*ptable))', assigned value is 0 libx86emu-3.5/mem.c:217:9: note: Null pointer dereference libx86emu-3.5/mem.c:227:29: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] libx86emu-3.5/mem.c:226:25: note: Assuming allocation function fails libx86emu-3.5/mem.c:226:25: note: Assignment 'page.attr=calloc(1,2*(1<<12))', assigned value is 0 libx86emu-3.5/mem.c:227:29: note: Null pointer addition 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/mem.c:117:43: style: Parameter 'mem' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/mem.c:151:50: style: Parameter 'emu' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/api.c:60:3: warning: If memory allocation fails, then there is a possible null pointer dereference: emu [nullPointerOutOfMemory] libx86emu-3.5/api.c:58:25: note: Assuming allocation function fails libx86emu-3.5/api.c:58:25: note: Assignment 'emu=calloc(1,sizeof(*emu))', assigned value is 0 libx86emu-3.5/api.c:60:3: note: Null pointer dereference libx86emu-3.5/api.c:62:3: warning: If memory allocation fails, then there is a possible null pointer dereference: emu [nullPointerOutOfMemory] libx86emu-3.5/api.c:58:25: note: Assuming allocation function fails libx86emu-3.5/api.c:58:25: note: Assignment 'emu=calloc(1,sizeof(*emu))', assigned value is 0 libx86emu-3.5/api.c:62:3: note: Null pointer dereference libx86emu-3.5/api.c:63:3: warning: If memory allocation fails, then there is a possible null pointer dereference: emu [nullPointerOutOfMemory] libx86emu-3.5/api.c:58:25: note: Assuming allocation function fails libx86emu-3.5/api.c:58:25: note: Assignment 'emu=calloc(1,sizeof(*emu))', assigned value is 0 libx86emu-3.5/api.c:63:3: note: Null pointer dereference libx86emu-3.5/api.c:64:3: warning: If memory allocation fails, then there is a possible null pointer dereference: emu [nullPointerOutOfMemory] libx86emu-3.5/api.c:58:25: note: Assuming allocation function fails libx86emu-3.5/api.c:58:25: note: Assignment 'emu=calloc(1,sizeof(*emu))', assigned value is 0 libx86emu-3.5/api.c:64:3: note: Null pointer dereference libx86emu-3.5/api.c:365:53: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/api.c:365:74: style: Parameter 'attr' can be declared as pointer to const [constParameterPointer] 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:1844:46: style: Parameter 'seg' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/decode.c:1847:15: style: Variable 'seg_name' can be declared as const array [constVariable] libx86emu-3.5/decode.c:2074:9: style: Variable 'err' is assigned a value that is never used. [unreadVariable] libx86emu-3.5/ops.c:1234:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1235:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1353:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1354:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1695:7: style: Variable 'dst' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1695:13: style: Variable 'src' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1724:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1724:16: style: Variable 'dst16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1725:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1725:16: style: Variable 'dst32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1852:13: style: Variable 'src' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1880:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1881:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1923:13: style: Variable 'src' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1951:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1952:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops.c:1257:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1298:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1376:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops.c:1417:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/test/x86test.c:100:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable opterr [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:202:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:210:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable INTR_TYPE_FAULT [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:232:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable X86EMU_PERM_R [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:395:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable X86EMU_RUN_LOOP [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:417:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable X86EMU_DUMP_MEM [valueFlowBailoutIncompleteVar] libx86emu-3.5/test/x86test.c:528:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] libx86emu-3.5/ops2.c:298:15: style: Variable 'src' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:804:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:805:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1081:8: style: Variable 'reg32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1082:8: style: Variable 'reg16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1131:16: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1132:16: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1191:16: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1192:16: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1325:16: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1326:16: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1385:16: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1386:16: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1437:8: style: Variable 'src32' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1438:8: style: Variable 'src16' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1684:7: style: Variable 'reg8' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:2049:7: style: Variable 'reg8' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/ops2.c:1458:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/ops2.c:1493:7: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] 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:803:23: style: Parameter 'emu' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/prim_ops.c:812:24: style: Parameter 'emu' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/prim_ops.c:821:24: style: Parameter 'emu' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/prim_ops.c:1080:13: warning: Shifting signed 32-bit value by 31 bits is undefined 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: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:1342:16: warning: Shifting signed 32-bit value by 31 bits is undefined 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: warning: Shifting signed 32-bit value by 31 bits is undefined 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: warning: Shifting signed 32-bit value by 31 bits is undefined 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: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/prim_ops.c:2148:3: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libx86emu-3.5/test/x86test.c:232:3: warning: If memory allocation fails, then there is a possible null pointer dereference: vm [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:230:14: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:230:14: note: Assignment 'vm=calloc(1,sizeof(*vm))', assigned value is 0 libx86emu-3.5/test/x86test.c:232:3: note: Null pointer dereference libx86emu-3.5/test/x86test.c:233:3: warning: If memory allocation fails, then there is a possible null pointer dereference: vm [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:230:14: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:230:14: note: Assignment 'vm=calloc(1,sizeof(*vm))', assigned value is 0 libx86emu-3.5/test/x86test.c:233:3: note: Null pointer dereference libx86emu-3.5/test/x86test.c:235:18: warning: If memory allocation fails, then there is a possible null pointer dereference: vm [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:230:14: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:230:14: note: Assignment 'vm=calloc(1,sizeof(*vm))', assigned value is 0 libx86emu-3.5/test/x86test.c:235:18: note: Null pointer dereference libx86emu-3.5/test/x86test.c:236:27: warning: If memory allocation fails, then there is a possible null pointer dereference: vm [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:230:14: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:230:14: note: Assignment 'vm=calloc(1,sizeof(*vm))', assigned value is 0 libx86emu-3.5/test/x86test.c:236:27: note: Null pointer dereference libx86emu-3.5/test/x86test.c:238:3: warning: If memory allocation fails, then there is a possible null pointer dereference: vm [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:230:14: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:230:14: note: Assignment 'vm=calloc(1,sizeof(*vm))', assigned value is 0 libx86emu-3.5/test/x86test.c:238:3: note: Null pointer dereference libx86emu-3.5/test/x86test.c:442:12: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:441:15: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:441:15: note: Assignment 's=calloc(1,i-5+strlen(suffix)+1)', assigned value is 0 libx86emu-3.5/test/x86test.c:442:12: note: Null pointer dereference libx86emu-3.5/test/x86test.c:443:12: warning: If memory allocation fails, then there is a possible null pointer dereference: s [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:441:15: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:441:15: note: Assignment 's=calloc(1,i-5+strlen(suffix)+1)', assigned value is 0 libx86emu-3.5/test/x86test.c:443:12: note: Null pointer dereference libx86emu-3.5/test/x86test.c:477:20: warning: If memory allocation fails, then there is a possible null pointer dereference: buf0 [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:475:22: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:475:22: note: Assignment 'buf0=malloc(i)', assigned value is 0 libx86emu-3.5/test/x86test.c:477:20: note: Null pointer dereference libx86emu-3.5/test/x86test.c:478:20: warning: If memory allocation fails, then there is a possible null pointer dereference: buf1 [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:476:22: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:476:22: note: Assignment 'buf1=malloc(i)', assigned value is 0 libx86emu-3.5/test/x86test.c:478:20: note: Null pointer dereference libx86emu-3.5/test/x86test.c:479:42: warning: If memory allocation fails, then there is a possible null pointer dereference: buf0 [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:475:22: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:475:22: note: Assignment 'buf0=malloc(i)', assigned value is 0 libx86emu-3.5/test/x86test.c:479:42: note: Null pointer dereference libx86emu-3.5/test/x86test.c:479:48: warning: If memory allocation fails, then there is a possible null pointer dereference: buf1 [nullPointerOutOfMemory] libx86emu-3.5/test/x86test.c:476:22: note: Assuming allocation function fails libx86emu-3.5/test/x86test.c:476:22: note: Assignment 'buf1=malloc(i)', assigned value is 0 libx86emu-3.5/test/x86test.c:479:48: note: Null pointer dereference libx86emu-3.5/test/x86test.c:97:13: style: Variable 't' can be declared as pointer to const [constVariablePointer] libx86emu-3.5/test/x86test.c:192:37: style: Parameter 'buf' can be declared as pointer to const. However it seems that 'flush_log' is a callback function, if 'buf' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libx86emu-3.5/test/x86test.c:235:36: note: You might need to cast the function pointer here libx86emu-3.5/test/x86test.c:192:37: note: Parameter 'buf' can be declared as pointer to const libx86emu-3.5/test/x86test.c:407:30: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] libx86emu-3.5/test/x86test.c:428:41: style: Parameter 'suffix' can be declared as pointer to const [constParameterPointer] diff: 2.17.0 libx86emu-3.5/mem.c:227:29: error: If memory allocation fail: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] libx86emu-3.5/mem.c:226:25: note: Assuming allocation function fails libx86emu-3.5/mem.c:226:25: note: Assignment 'page.attr=calloc(1,2*(1<<12))', assigned value is 0 libx86emu-3.5/mem.c:227:29: note: Null pointer addition head libx86emu-3.5/mem.c:227:29: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] libx86emu-3.5/mem.c:226:25: note: Assuming allocation function fails libx86emu-3.5/mem.c:226:25: note: Assignment 'page.attr=calloc(1,2*(1<<12))', assigned value is 0 libx86emu-3.5/mem.c:227:29: note: Null pointer addition DONE