2024-04-24 23:34 ftp://ftp.de.debian.org/debian/pool/main/g/grub/grub_0.97.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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 94f28a2 (2024-04-24 20:47:54 +0200) count: 213 213 elapsed-time: 65.7 65.9 head-timing-info: old-timing-info: head results: grub-0.97/docs/kernel.c:61:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MULTIBOOT_BOOTLOADER_MAGIC [valueFlowBailoutIncompleteVar] grub-0.97/docs/kernel.c:255:10: style: Variable 'p' can be declared as pointer to const [constVariablePointer] grub-0.97/docs/kernel.c:208:18: warning: Uninitialized variable: *p1 [uninitvar] grub-0.97/docs/kernel.c:263:14: note: Calling function 'itoa', 1st argument 'buf' value is grub-0.97/docs/kernel.c:204:8: note: Assignment 'p1=buf', assigned value is grub-0.97/docs/kernel.c:208:18: note: Uninitialized variable: *p1 grub-0.97/grub/asmstub.c:136:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:240:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:352:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BOOTSEC_LOCATION [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:526:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ACS_ULCORNER [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:739:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLOR_STATE_HIGHLIGHT [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:765:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:839:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:865:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:935:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:1076:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable B2400 [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:1119:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDWR [valueFlowBailoutIncompleteVar] grub-0.97/grub/asmstub.c:713:19: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] grub-0.97/grub/asmstub.c:112:16: style: Variable 'realstack' can be declared as pointer to const [constVariablePointer] grub-0.97/grub/asmstub.c:113:19: style: Variable 'simstack' can be declared as pointer to const [constVariablePointer] grub-0.97/grub/asmstub.c:343:36: style: Parameter 'map' can be declared as pointer to const [constParameterPointer] grub-0.97/grub/asmstub.c:461:49: style: Parameter 'controller' can be declared as pointer to const [constParameterPointer] grub-0.97/grub/asmstub.c:469:54: style: Parameter 'mode' can be declared as pointer to const [constParameterPointer] grub-0.97/grub/asmstub.c:928:52: style: Parameter 'geometry' can be declared as pointer to const [constParameterPointer] grub-0.97/grub/main.c:163:30: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] grub-0.97/lib/device.c:142:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_RDONLY [valueFlowBailoutIncompleteVar] grub-0.97/lib/device.c:427:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] grub-0.97/lib/device.c:496:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable msg [valueFlowBailoutIncompleteVar] grub-0.97/lib/device.c:627:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NUM_DISKS [valueFlowBailoutIncompleteVar] grub-0.97/lib/device.c:819:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NUM_DISKS [valueFlowBailoutIncompleteVar] grub-0.97/lib/device.c:231:2: style: Label 'fail' is not used. [unusedLabel] grub-0.97/lib/device.c:257:2: style: Label 'success' is not used. [unusedLabel] grub-0.97/lib/getopt.c:680:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] grub-0.97/lib/getopt.c:774:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/nic.h:18:16: error: There is an unknown macro here somewhere. Configuration is required. If P is a macro then please configure it. [unknownMacro] grub-0.97/netboot/config.c:513:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable network_ready [valueFlowBailoutIncompleteVar] grub-0.97/netboot/config.c:590:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IP [valueFlowBailoutIncompleteVar] grub-0.97/netboot/config.c:468:24: style: Parameter 'dummy' can be declared as pointer to const. However it seems that 'eth_dummy' is a callback function, if 'dummy' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/netboot/config.c:482:29: note: You might need to cast the function pointer here grub-0.97/netboot/config.c:468:24: note: Parameter 'dummy' can be declared as pointer to const grub-0.97/netboot/config.c:504:22: style: Variable 'p' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/config.c:518:5: style: Variable 'p' is assigned a value that is never used. [unreadVariable] grub-0.97/netboot/fsys_tftp.c:57:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FSYS_BUFLEN [valueFlowBailoutIncompleteVar] grub-0.97/netboot/fsys_tftp.c:265:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TFTP_DEFAULTSIZE_PACKET [valueFlowBailoutIncompleteVar] grub-0.97/netboot/fsys_tftp.c:307:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable current_drive [valueFlowBailoutIncompleteVar] grub-0.97/netboot/fsys_tftp.c:328:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable filepos [valueFlowBailoutIncompleteVar] grub-0.97/netboot/fsys_tftp.c:421:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable print_possibilities [valueFlowBailoutIncompleteVar] grub-0.97/netboot/fsys_tftp.c:114:32: style: Variable 'e' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/main.c:122:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ARP_CLIENT [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:136:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ARP_CLIENT [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:161:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ARP_CLIENT [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:208:65: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iphdr [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:310:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TFTP_DEFAULTSIZE_PACKET [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:494:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable IP [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:552:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable bootpip_t [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:720:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable iphdr [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:747:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_HLEN [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:994:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable bootp_extension [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:1148:49: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ARP_CLIENT [valueFlowBailoutIncompleteVar] grub-0.97/netboot/main.c:992:18: error: Pointer addition with NULL pointer. [nullPointerArithmetic] grub-0.97/netboot/main.c:964:51: note: Assignment 'extend=NULL', assigned value is 0 grub-0.97/netboot/main.c:982:17: note: Assuming condition is false grub-0.97/netboot/main.c:992:18: note: Null pointer addition grub-0.97/netboot/main.c:378:32: style: Variable 'e' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/main.c:695:24: style: Parameter 'start' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/main.c:695:65: style: Parameter 'sum' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/main.c:743:18: style: Variable 'udp' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/main.c:1117:27: style: Parameter 'ip' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/misc.c:42:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable debug [valueFlowBailoutIncompleteVar] grub-0.97/netboot/misc.c:189:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ETH_ALEN [valueFlowBailoutIncompleteVar] grub-0.97/netboot/misc.c:186:14: style: Variable 'r' can be declared as pointer to const [constVariablePointer] grub-0.97/netboot/pci.c:456:21: style: The comparison 'pci_ioaddr == 0' is always true. [knownConditionTrueFalse] grub-0.97/netboot/pci.c:406:28: note: 'pci_ioaddr' is assigned value '0' here. grub-0.97/netboot/pci.c:456:21: note: The comparison 'pci_ioaddr == 0' is always true. grub-0.97/netboot/pci.c:136:68: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/pci.c:163:69: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/pci.c:190:67: style: Parameter 'value' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/etherboot.h:480:34: style: Parameter 'rom' can be declared as pointer to const [constParameterPointer] grub-0.97/netboot/pci.c:89:17: style: struct member 'Anonymous12::segment' is never used. [unusedStructMember] grub-0.97/netboot/pci.c:95:17: style: struct member 'Anonymous13::segment' is never used. [unusedStructMember] grub-0.97/netboot/pci.c:328:18: style: Variable 'major_revision' is assigned a value that is never used. [unreadVariable] grub-0.97/netboot/pci.c:329:18: style: Variable 'minor_revision' is assigned a value that is never used. [unreadVariable] grub-0.97/netboot/w89c840.c:137:0: error: #error You must compile this driver with "-O". [preprocessorErrorDirective] grub-0.97/stage2/bios.c:49:15: style:inconclusive: Function 'biosdisk' argument 1 names different: declaration 'subfunc' definition 'read'. [funcArgNamesDifferent] grub-0.97/stage2/shared.h:809:19: note: Function 'biosdisk' argument 1 names different: declaration 'subfunc' definition 'read'. grub-0.97/stage2/bios.c:49:15: note: Function 'biosdisk' argument 1 names different: declaration 'subfunc' definition 'read'. grub-0.97/stage2/bios.c:81:18: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] grub-0.97/stage2/boot.c:81:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[0]==0x7f' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[2]=='L'' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[3]=='F'' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[4]==1' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[5]==1' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_ident[6]==1' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_type==2' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_machine==3' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:104:10: style:inconclusive: Boolean expression '(*((struct Elf32_Ehdr*)buffer)).e_version==1' is used in bitwise operation. Did you mean '&&'? [bitwiseOnBoolean] grub-0.97/stage2/boot.c:404:12: style: Variable 'src' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/boot.c:593:19: style: Variable 'phdr' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/boot.c:267:16: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment] grub-0.97/stage2/builtins.c:89:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERNEL_TYPE_NONE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:144:67: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable length [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:243:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERNEL_TYPE_NONE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:418:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERNEL_TYPE_NONE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:495:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:594:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable str [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:699:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable config_file [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:771:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_entryno [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:860:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:904:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCRATCHADDR [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1037:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1170:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAX_FALLBACK_ENTRIES [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1207:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1310:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable disk_read_hook [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1347:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1477:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable builtin_table [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1724:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:1748:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SECTOR_SIZE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2299:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2332:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERNEL_TYPE_NONE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2422:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2475:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2592:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MB_CMDLINE_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2638:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable no_decompression [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2667:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable use_pager [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2704:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable dh [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2827:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable current_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:2894:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PASSWORD_PLAIN [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:3085:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:3137:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:3225:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:3622:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable key [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:3801:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable file [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:4384:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KERNEL_TYPE_NONE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:4476:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:4669:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mem_upper [valueFlowBailoutIncompleteVar] grub-0.97/stage2/builtins.c:150:23: style: Condition 'num_sectors>0' is always false [knownConditionTrueFalse] grub-0.97/stage2/builtins.c:140:21: note: Assignment 'num_sectors=0', assigned value is 0 grub-0.97/stage2/builtins.c:150:23: note: Condition 'num_sectors>0' is always false grub-0.97/stage2/builtins.c:179:31: style: Condition 'num_entries' is always false [knownConditionTrueFalse] grub-0.97/stage2/builtins.c:141:21: note: Assignment 'num_entries=0', assigned value is 0 grub-0.97/stage2/builtins.c:179:31: note: Condition 'num_entries' is always false grub-0.97/stage2/builtins.c:3240:24: style: Condition 'sector_count<2' is always true [knownConditionTrueFalse] grub-0.97/stage2/builtins.c:3231:22: note: Assignment 'sector_count=0', assigned value is 0 grub-0.97/stage2/builtins.c:3240:24: note: Condition 'sector_count<2' is always true grub-0.97/stage2/builtins.c:109:23: style: Parameter 'entered' can be declared as pointer to const [constParameterPointer] grub-0.97/stage2/builtins.c:109:38: style: Parameter 'expected' can be declared as pointer to const [constParameterPointer] grub-0.97/stage2/builtins.c:738:19: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'debug_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:757:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:738:19: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:1308:20: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'fstest_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:1327:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:1308:20: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:1586:24: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'hiddenmenu_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:1595:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:1586:24: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:1685:23: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'impsprobe_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:1702:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:1685:23: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:2418:18: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'lock_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:2432:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:2418:18: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:2441:24: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'makeactive_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:2452:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:2441:24: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:2965:19: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'pause_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:2979:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:2965:19: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:3063:20: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'reboot_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:3074:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:3063:20: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:4622:19: style: Parameter 'arg' can be declared as pointer to const. However it seems that 'title_func' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s). [constParameterCallback] grub-0.97/stage2/builtins.c:4631:3: note: You might need to cast the function pointer here grub-0.97/stage2/builtins.c:4622:19: note: Parameter 'arg' can be declared as pointer to const grub-0.97/stage2/builtins.c:1815:32: error: Uninitialized variable: installlist [uninitvar] grub-0.97/stage2/builtins.c:1806:23: note: Assuming condition is false grub-0.97/stage2/builtins.c:1815:32: note: Uninitialized variable: installlist grub-0.97/stage2/builtins.c:1825:51: error: Uninitialized variable: installaddr [uninitvar] grub-0.97/stage2/builtins.c:1806:23: note: Assuming condition is false grub-0.97/stage2/builtins.c:1825:51: note: Uninitialized variable: installaddr grub-0.97/stage2/char_io.c:94:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:242:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mem_upper [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:256:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HISTORY_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:263:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HISTORY_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:319:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CMDLINE_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:796:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TERM_NO_ECHO [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:879:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MAXINT [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:1050:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COLOR_STATE_HIGHLIGHT [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:1093:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TERM_DUMB [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:1212:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable mem_lower [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:1253:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:1267:10: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/char_io.c:197:12: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/char_io.c:674:9: style: Variable 'p' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/char_io.c:699:9: style: Variable 'p' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/char_io.c:341:11: error: Uninitialized variable: section [uninitvar] grub-0.97/stage2/char_io.c:341:27: error: Uninitialized variable: plen [uninitvar] grub-0.97/stage2/char_io.c:343:16: error: Uninitialized variable: xpos [uninitvar] grub-0.97/stage2/char_io.c:455:46: error: Uninitialized variable: llen [uninitvar] grub-0.97/stage2/char_io.c:803:9: style: Variable 'maxlen' is assigned a value that is never used. [unreadVariable] grub-0.97/stage2/cmdline.c:77:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable builtin_table [valueFlowBailoutIncompleteVar] grub-0.97/stage2/cmdline.c:102:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/cmdline.c:140:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/cmdline.c:198:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/common.c:239:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Length [valueFlowBailoutIncompleteVar] grub-0.97/stage2/common.c:221:42: style: Condition '(memtmp=get_eisamemsize())!=-1' is always true [knownConditionTrueFalse] grub-0.97/stage2/common.c:119:26: style: Variable 'desc' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/common.c:212:26: style: Variable 'desc' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/common.c:223:14: error: Uninitialized variable: memtmp [legacyUninitvar] grub-0.97/stage2/disk_io.c:148:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:300:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SECTOR_BITS [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:337:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BIOSDISK_READ [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:387:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SECTOR_BITS [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:399:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NETWORK_DRIVE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:421:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NUM_FSYS [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:447:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:512:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:555:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:596:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BSD_LABEL_SECTOR [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:759:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SECTOR_SIZE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:969:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1117:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1131:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable saved_drive [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1202:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GRUB_INVALID_DRIVE [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1257:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable NUM_FSYS [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1312:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable COMPLETION_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1541:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable compressed_file [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1663:7: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errnum [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1758:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable compressed_file [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1788:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable close_func [valueFlowBailoutIncompleteVar] grub-0.97/stage2/disk_io.c:1362:8: warning: Either the condition '!ptr' is redundant or there is possible null pointer dereference: buf. [nullPointerRedundantCheck] grub-0.97/stage2/disk_io.c:1377:12: note: Assuming that condition '!ptr' is not redundant grub-0.97/stage2/disk_io.c:1313:13: note: ptr is assigned 'buf' here. grub-0.97/stage2/disk_io.c:1320:7: note: Assuming condition is false grub-0.97/stage2/disk_io.c:1362:8: note: Null pointer dereference grub-0.97/stage2/disk_io.c:1136:16: style: Variable 'src' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/gunzip.c:741:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable e [valueFlowBailoutIncompleteVar] grub-0.97/stage2/gunzip.c:979:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable b [valueFlowBailoutIncompleteVar] grub-0.97/stage2/gunzip.c:526:12: style: Parameter 'd' can be declared as pointer to const [constParameterPointer] grub-0.97/stage2/gunzip.c:527:12: style: Parameter 'e' can be declared as pointer to const [constParameterPointer] grub-0.97/stage2/gunzip.c:1205:22: style: Variable 'srcaddr' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/gunzip.c:905:10: style: Variable 'i' is assigned a value that is never used. [unreadVariable] grub-0.97/stage2/gunzip.c:1048:10: style: Variable 'i' is assigned a value that is never used. [unreadVariable] grub-0.97/stage2/smp-imps.c:388:16: style: Condition 'boot_cpu(proc)' is always true [knownConditionTrueFalse] grub-0.97/stage2/smp-imps.c:388:16: note: Calling function 'boot_cpu' returns 1 grub-0.97/stage2/smp-imps.c:388:16: note: Condition 'boot_cpu(proc)' is always true grub-0.97/stage2/smp-imps.c:558:19: style: Redundant assignment of 'imps_lapic_addr' to itself. [selfAssignment] grub-0.97/stage2/smp-imps.c:309:28: style: Parameter 'proc' can be declared as pointer to const [constParameterPointer] grub-0.97/stage2/smp-imps.c:137:20: style: struct member 'Anonymous3::lintin' is never used. [unusedStructMember] grub-0.97/stage2/smp-imps.c:331:21: style: Variable 'accept_status' is assigned a value that is never used. [unreadVariable] grub-0.97/stage2/stage2.c:102:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable setcolorstate [valueFlowBailoutIncompleteVar] grub-0.97/stage2/stage2.c:137:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable DISP_UP [valueFlowBailoutIncompleteVar] grub-0.97/stage2/stage2.c:196:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable setcolorstate [valueFlowBailoutIncompleteVar] grub-0.97/stage2/stage2.c:244:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable flags [valueFlowBailoutIncompleteVar] grub-0.97/stage2/stage2.c:837:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable KILL_BUF [valueFlowBailoutIncompleteVar] grub-0.97/stage2/stage2.c:913:12: style: Condition '!is_opened' is always true [knownConditionTrueFalse] grub-0.97/stage2/stage2.c:912:0: note: Assignment 'is_opened=0', assigned value is 0 grub-0.97/stage2/stage2.c:913:12: note: Condition '!is_opened' is always true grub-0.97/stage2/stage2.c:940:15: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] grub-0.97/stage2/stage2.c:981:15: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] grub-0.97/util/mbchk.c:202:31: error: There is an unknown macro here somewhere. Configuration is required. If VERSION is a macro then please configure it. [unknownMacro] diff: DONE