Error: SHELLCHECK_WARNING (CWE-563): [#def1] /usr/lib/kernel/install.d/95-set-boot-entry.install:7:1: warning[SC2034]: KERNEL_VERSION appears unused. Verify use (or export if used externally). # 5| # 6| COMMAND="$1" # 7|-> KERNEL_VERSION="$2" # 8| BOOT_DIR_ABS="$3" # 9| KERNEL_IMAGE="$4" Error: SHELLCHECK_WARNING (CWE-563): [#def2] /usr/lib/kernel/install.d/95-set-boot-entry.install:8:1: warning[SC2034]: BOOT_DIR_ABS appears unused. Verify use (or export if used externally). # 6| COMMAND="$1" # 7| KERNEL_VERSION="$2" # 8|-> BOOT_DIR_ABS="$3" # 9| KERNEL_IMAGE="$4" # 10| Error: SHELLCHECK_WARNING (CWE-563): [#def3] /usr/lib/kernel/install.d/95-set-boot-entry.install:9:1: warning[SC2034]: KERNEL_IMAGE appears unused. Verify use (or export if used externally). # 7| KERNEL_VERSION="$2" # 8| BOOT_DIR_ABS="$3" # 9|-> KERNEL_IMAGE="$4" # 10| # 11| case "$COMMAND" in Error: SHELLCHECK_WARNING (CWE-477): [#def4] /usr/lib/kernel/install.d/95-set-boot-entry.install:26:49: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 24| [ -z "$(grub2-mkrelpath /boot)" ] && ROOTPREFIX="/boot" # 25| # 26|-> if [ -e "${ROOTPREFIX}${LINUX}" -a -n "${INITRD}" ]; then # 27| if [ ! -e "${ROOTPREFIX}${INITRD}" ]; then # 28| echo "Error: ${ROOTPREFIX}${INITRD} not found." Error: COMPILER_WARNING: [#def5] grub-2.12/grub-core/commands/blsuki.c:74:37: warning[-Wunused-const-variable=]: ‘bls_opt’ defined but not used # 74 | static const struct grub_arg_option bls_opt[] = # | ^~~~~~~ # 72| }; # 73| # 74|-> static const struct grub_arg_option bls_opt[] = # 75| { # 76| {"path", 'p', 0, "Specify path to find BLS entries.", N_("DIR"), ARG_TYPE_PATHNAME}, Error: COMPILER_WARNING (CWE-1164): [#def6] grub-2.12/grub-core/commands/blsuki.c:1457:1: warning[-Wunused-function]: ‘grub_cmd_blscfg’ defined but not used # 1457 | grub_cmd_blscfg (grub_extcmd_context_t ctxt, int argc __attribute__ ((unused)), # | ^~~~~~~~~~~~~~~ # 1455| # 1456| static grub_err_t # 1457|-> grub_cmd_blscfg (grub_extcmd_context_t ctxt, int argc __attribute__ ((unused)), # 1458| char **args __attribute__ ((unused))) # 1459| { Error: COMPILER_WARNING: [#def7] grub-2.12/include/grub/dl.h:29: included_from: Included from here. grub-2.12/grub-core/commands/efi/env.c:18: included_from: Included from here. grub-2.12/grub-core/commands/efi/env.c: scope_hint: In function ‘grub_efi_export_env’ grub-2.12/grub-core/commands/efi/env.c:111:27: warning[-Wformat=]: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘grub_size_t’ {aka ‘unsigned int’} # 111 | grub_dprintf ("efienv", "envblk is %lu bytes:\n\"%s\"\n", envblk_s.size, envblk_s.buf); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ # | | # | grub_size_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/commands/efi/env.c:111:40: note: format string is defined here # 111 | grub_dprintf ("efienv", "envblk is %lu bytes:\n\"%s\"\n", envblk_s.size, envblk_s.buf); # | ~~^ # | | # | long unsigned int # | %u # 109| } # 110| # 111|-> grub_dprintf ("efienv", "envblk is %lu bytes:\n\"%s\"\n", envblk_s.size, envblk_s.buf); # 112| # 113| grub_dprintf ("efienv", "removing GRUB_ENV\n"); Error: COMPILER_WARNING: [#def8] grub-2.12/grub-core/commands/efi/env.c:116:29: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘grub_efi_status_t’ {aka ‘unsigned int’} # 116 | grub_dprintf ("efienv", "removal returned %ld\n", status); # | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ # | | # | grub_efi_status_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/commands/efi/env.c:116:49: note: format string is defined here # 116 | grub_dprintf ("efienv", "removal returned %ld\n", status); # | ~~^ # | | # | long int # | %d # 114| status = grub_efi_set_variable ("GRUB_ENV", &grub_env_guid, NULL, 0); # 115| if (status != GRUB_EFI_SUCCESS) # 116|-> grub_dprintf ("efienv", "removal returned %ld\n", status); # 117| # 118| grub_dprintf ("efienv", "setting GRUB_ENV\n"); Error: COMPILER_WARNING: [#def9] grub-2.12/grub-core/commands/efi/env.c:122:29: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘grub_efi_status_t’ {aka ‘unsigned int’} # 122 | grub_dprintf ("efienv", "setting GRUB_ENV returned %ld\n", status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ # | | # | grub_efi_status_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/commands/efi/env.c:122:58: note: format string is defined here # 122 | grub_dprintf ("efienv", "setting GRUB_ENV returned %ld\n", status); # | ~~^ # | | # | long int # | %d # 120| envblk_s.buf, envblk_s.size); # 121| if (status != GRUB_EFI_SUCCESS) # 122|-> grub_dprintf ("efienv", "setting GRUB_ENV returned %ld\n", status); # 123| # 124| return 0; Error: COMPILER_WARNING: [#def10] grub-2.12/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘grub_efi_status_t’ {aka ‘unsigned int’} # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 178 | alloctype, memtype, pages, address, status); # | ~~~~~~ # | | # | grub_efi_status_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/kern/efi/mm.c:177:72: note: format string is defined here # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ~~~~~^ # | | # | long unsigned int # | %016x # 175| { # 176| grub_dprintf ("efi", # 177|-> "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # 178| alloctype, memtype, pages, address, status); # 179| grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); Error: COMPILER_WARNING: [#def11] grub-2.12/grub-core/kern/efi/mm.c:20: included_from: Included from here. grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_efi_allocate_pages_real’ grub-2.12/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘grub_efi_uintn_t’ {aka ‘unsigned int’} # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 178 | alloctype, memtype, pages, address, status); # | ~~~~~ # | | # | grub_efi_uintn_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/kern/efi/mm.c:177:50: note: format string is defined here # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ~~~^ # | | # | long unsigned int # | %0x # 175| { # 176| grub_dprintf ("efi", # 177|-> "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # 178| alloctype, memtype, pages, address, status); # 179| grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); Error: COMPILER_WARNING: [#def12] grub-2.12/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 178 | alloctype, memtype, pages, address, status); # | ~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/kern/efi/mm.c:177:60: note: format string is defined here # 177 | "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # | ~~~~~^ # | | # | long unsigned int # | %016llx # 175| { # 176| grub_dprintf ("efi", # 177|-> "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n", # 178| alloctype, memtype, pages, address, status); # 179| grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); Error: COMPILER_WARNING: [#def13] grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_nx_init’ grub-2.12/grub-core/kern/efi/mm.c:628:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 628 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 629 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 626| { # 627| grub_dprintf ("nx", # 628|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 629| stack_current, err); # 630| grub_error_pop (); Error: COMPILER_WARNING: [#def14] grub-2.12/grub-core/kern/efi/mm.c:644:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 644 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 645 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 642| { # 643| grub_dprintf ("nx", # 644|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 645| stack_current, err); # 646| grub_error_pop (); Error: COMPILER_WARNING: [#def15] grub-2.12/grub-core/kern/efi/mm.c:665:25: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 665 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 666 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 663| { # 664| grub_dprintf ("nx", # 665|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 666| stack_current, err); # 667| grub_error_pop (); Error: COMPILER_WARNING: [#def16] grub-2.12/grub-core/kern/efi/mm.c:871:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 8 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 871 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # | ^~~~~~~~~~~~~~~~~~ # 872 | __func__, physaddr, physaddr+size-1, attrs); # | ~~~~~~~~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 869| if (physaddr & 0xfff || size & 0xfff || size == 0 || attrs == NULL) # 870| { # 871|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # 872| __func__, physaddr, physaddr+size-1, attrs); # 873| return 0; Error: COMPILER_WARNING: [#def17] grub-2.12/grub-core/kern/efi/mm.c:905:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 8 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 905 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # | ^~~~~~~~~~~~~~~~~~ # 906 | __func__, physaddr, physaddr + size - 1, # | ~~~~~~~~~~~~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 903| if (physaddr & 0xfff || size & 0xfff || size == 0) # 904| { # 905|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # 906| __func__, physaddr, physaddr + size - 1, # 907| (set_attrs & GRUB_MEM_ATTR_R) ? "r" : "", Error: COMPILER_WARNING: [#def18] grub-2.12/grub-core/kern/efi/mm.c:917:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 917 | grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ # | | # | grub_uint64_t {aka long long unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/kern/efi/mm.c:917:64: note: format string is defined here # 917 | grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 915| # 916| uefi_set_attrs = grub_mem_attrs_to_uefi_mem_attrs (set_attrs); # 917|-> grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 918| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 919| grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); Error: COMPILER_WARNING: [#def19] grub-2.12/grub-core/kern/efi/mm.c:919:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 919 | grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ # | | # | grub_uint64_t {aka long long unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/kern/efi/mm.c:919:66: note: format string is defined here # 919 | grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 917| grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 918| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 919|-> grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # 920| if (uefi_set_attrs) # 921| efi_status = proto->set_memory_attributes( Error: COMPILER_WARNING (CWE-195): [#def20] grub-2.12/grub-core/lib/gnulib/filevercmp.c: scope_hint: In function ‘file_prefixlen’ grub-2.12/grub-core/lib/gnulib/filevercmp.c:43:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} # 43 | while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # | ^ # 41| { # 42| idx_t prefixlen = i; # 43|-> while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # 44| || s[i + 1] == '~')) # 45| for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) Error: COMPILER_WARNING (CWE-195): [#def21] grub-2.12/grub-core/lib/gnulib/filevercmp.c: scope_hint: In function ‘file_prefixlen’ grub-2.12/grub-core/lib/gnulib/filevercmp.c:43:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘unsigned int’} # 43 | while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # | ^ # 41| { # 42| idx_t prefixlen = i; # 43|-> while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # 44| || s[i + 1] == '~')) # 45| for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) Error: COMPILER_WARNING (CWE-195): [#def22] grub-2.12/grub-core/lib/gnulib/filevercmp.c:45:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 45 | for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) # | ^ # 43| while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # 44| || s[i + 1] == '~')) # 45|-> for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) # 46| continue; # 47| Error: COMPILER_WARNING (CWE-195): [#def23] grub-2.12/grub-core/lib/gnulib/filevercmp.c:45:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} # 45 | for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) # | ^ # 43| while (i + 1 < n && s[i] == '.' && (c_isalpha (s[i + 1]) # 44| || s[i + 1] == '~')) # 45|-> for (i += 2; i < n && (c_isalnum (s[i]) || s[i] == '~'); i++) # 46| continue; # 47| Error: COMPILER_WARNING (CWE-195): [#def24] grub-2.12/grub-core/lib/gnulib/filevercmp.c:48:32: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 48 | if (*len < 0 ? !s[i] : i == n) # | ^~ # 46| continue; # 47| # 48|-> if (*len < 0 ? !s[i] : i == n) # 49| { # 50| *len = i; Error: COMPILER_WARNING (CWE-195): [#def25] grub-2.12/grub-core/lib/gnulib/filevercmp.c:48:32: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} # 48 | if (*len < 0 ? !s[i] : i == n) # | ^~ # 46| continue; # 47| # 48|-> if (*len < 0 ? !s[i] : i == n) # 49| { # 50| *len = i; Error: COMPILER_WARNING: [#def26] grub-2.12/include/grub/dl.h:29: included_from: Included from here. grub-2.12/include/grub/fs.h:26: included_from: Included from here. grub-2.12/include/grub/file.h:25: included_from: Included from here. grub-2.12/include/grub/loader.h:23: included_from: Included from here. grub-2.12/grub-core/loader/efi/chainloader.c:22: included_from: Included from here. grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘handle_image’ grub-2.12/grub-core/loader/efi/chainloader.c:830:26: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘grub_efi_status_t’ {aka ‘unsigned int’} # 830 | grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ # | | # | grub_efi_status_t {aka unsigned int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/loader/efi/chainloader.c:830:50: note: format string is defined here # 830 | grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); # | ~~^ # | | # | long int # | %d # 828| grub_efi_system_table); # 829| # 830|-> grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); # 831| grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); # 832| efi_status = b->free_pool (buffer); Error: COMPILER_WARNING: [#def27] grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_cmd_chainloader’ grub-2.12/grub-core/loader/efi/chainloader.c:1085:22: warning[-Wformat=]: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘grub_ssize_t’ {aka ‘int’} # 1085 | grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1086 | (void *)(grub_addr_t)address, fsize, 0llu); # | ~~~~~ # | | # | grub_ssize_t {aka int} grub-2.12/include/grub/misc.h:46:102: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __FUNCTION__, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.12/grub-core/loader/efi/chainloader.c:1085:52: note: format string is defined here # 1085 | grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # | ~~^ # | | # | long unsigned int # | %u # 1083| * in doing anything but clearing the protection bits here. # 1084| */ # 1085|-> grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # 1086| (void *)(grub_addr_t)address, fsize, 0llu); # 1087| grub_update_mem_attrs (address, fsize, Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] grub-2.12/grub-core/osdep/linux/getroot.c:460:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ grub-2.12/grub-core/osdep/linux/getroot.c:1290:1: enter_function: entry to ‘grub_util_get_btrfs_subvol’ grub-2.12/grub-core/osdep/linux/getroot.c:1296:14: call_function: calling ‘grub_find_root_devices_from_mountinfo’ from ‘grub_util_get_btrfs_subvol’ grub-2.12/grub-core/osdep/linux/getroot.c:1296:14: return_function: returning to ‘grub_util_get_btrfs_subvol’ from ‘grub_find_root_devices_from_mountinfo’ grub-2.12/grub-core/osdep/linux/getroot.c:1299:6: branch_false: following ‘false’ branch... grub-2.12/grub-core/osdep/linux/getroot.c:1302:6: branch_false: ...to here grub-2.12/grub-core/osdep/linux/getroot.c:1302:6: branch_false: following ‘false’ branch (when ‘mount_path’ is NULL)... grub-2.12/grub-core/osdep/linux/getroot.c:1305:10: branch_false: ...to here grub-2.12/grub-core/osdep/linux/getroot.c:1305:10: call_function: calling ‘get_btrfs_subvol’ from ‘grub_util_get_btrfs_subvol’ # 458| # 459| if (ioctl (fd, BTRFS_IOC_INO_LOOKUP, &args) < 0) # 460|-> goto error; # 461| # 462| s = xasprintf ("%s%s", args.name, ret);
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-159.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | grub2-2.12-40.fc43 |
| diffbase-store-results-to | /tmp/tmpcn0f1it8/grub2-2.12-40.fc43.tar.xz |
| diffbase-time-created | 2026-01-08 16:48:18 |
| diffbase-time-finished | 2026-01-08 17:19:37 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpcn0f1it8/grub2-2.12-40.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcn0f1it8/grub2-2.12-40.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-159.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | grub2-2.12-50.fc44 |
| store-results-to | /tmp/tmpss_tvdwa/grub2-2.12-50.fc44.tar.xz |
| time-created | 2026-01-08 17:20:08 |
| time-finished | 2026-01-08 17:50:57 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpss_tvdwa/grub2-2.12-50.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpss_tvdwa/grub2-2.12-50.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |