Task #69 - grub2-2.06-121.fc41/scan-results.err
back to task #69download
Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/00_header:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix="/usr" # 21| exec_prefix="/usr" # 22| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/00_header:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix="/usr" # 21|-> exec_prefix="/usr" # 22| datarootdir="/usr/share" # 23| grub_lang=`echo $LANG | cut -d . -f 1` Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/00_header:28:4: warning[SC2154]: pkgdatadir is referenced but not assigned. # 26| export TEXTDOMAINDIR="${datarootdir}/locale" # 27| # 28|-> . "$pkgdatadir/grub-mkconfig_lib" # 29| # 30| if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] && Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/00_header:162:38: warning[SC2046]: Quote this to prevent word splitting. # 160| if [ -n "$GRUB_FONT" ] ; then # 161| # Make the font accessible # 162|-> prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"` # 163| cat << EOF # 164| if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/00_header:162:39: warning[SC2154]: grub_probe is referenced but not assigned. # 160| if [ -n "$GRUB_FONT" ] ; then # 161| # Make the font accessible # 162|-> prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"` # 163| cat << EOF # 164| if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/00_header:185:33: warning[SC2046]: Quote this to prevent word splitting. # 183| EOF # 184| # Make the font accessible # 185|-> prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"` # 186| cat << EOF # 187| font="`make_system_path_relative_to_its_root "${font_path}"`" Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/00_header:246:32: warning[SC2046]: Quote this to prevent word splitting. # 244| gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2 # 245| # 246|-> prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` # 247| cat << EOF # 248| insmod gfxmenu Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/00_header:287:32: warning[SC2046]: Quote this to prevent word splitting. # 285| *) gettext "Unsupported image format" >&2; echo >&2; exit 1 ;; # 286| esac # 287|-> prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` # 288| cat << EOF # 289| insmod $reader Error: SHELLCHECK_WARNING (CWE-398): /etc/grub.d/00_header:350:6: warning[SC1010]: Use semicolon or linefeed before 'fi' (or quote to make it literal). # 348| echo else # 349| make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}" # 350|-> echo fi # 351| else # 352| make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/10_linux:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix="/usr" # 21| exec_prefix="/usr" # 22| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/10_linux:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix="/usr" # 21|-> exec_prefix="/usr" # 22| datarootdir="/usr/share" # 23| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/10_linux:24:4: warning[SC2154]: pkgdatadir is referenced but not assigned. # 22| datarootdir="/usr/share" # 23| # 24|-> . "$pkgdatadir/grub-mkconfig_lib" # 25| # 26| export TEXTDOMAIN=grub Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:32:14: warning[SC2046]: Quote this to prevent word splitting. # 30| # 31| if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then # 32|-> OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})" # 33| CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n "${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}" # 34| else Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:33:25: warning[SC2046]: Quote this to prevent word splitting. # 31| if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then # 32| OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})" # 33|-> CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n "${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}" # 34| else # 35| OS="${GRUB_DISTRIBUTOR}" Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/10_linux:79:9: warning[SC2154]: grub_probe is referenced but not assigned. # 77| fi;; # 78| xzfs) # 79|-> rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` # 80| bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" # 81| LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}" Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:145:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 143| fi # 144| # 145|-> local IFS=$'\n' # 146| # 147| files=($(for bls in ${blsdir}/*.conf; do Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:145:15: warning[SC3003]: In POSIX sh, $'..' is undefined. # 143| fi # 144| # 145|-> local IFS=$'\n' # 146| # 147| files=($(for bls in ${blsdir}/*.conf; do Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:147:11: warning[SC3030]: In POSIX sh, arrays are undefined. # 145| local IFS=$'\n' # 146| # 147|-> files=($(for bls in ${blsdir}/*.conf; do # 148| if ! [[ -e "${bls}" ]] ; then # 149| continue Error: SHELLCHECK_WARNING (CWE-140): /etc/grub.d/10_linux:147:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # 145| local IFS=$'\n' # 146| # 147|-> files=($(for bls in ${blsdir}/*.conf; do # 148| if ! [[ -e "${bls}" ]] ; then # 149| continue Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:148:14: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 146| # 147| files=($(for bls in ${blsdir}/*.conf; do # 148|-> if ! [[ -e "${bls}" ]] ; then # 149| continue # 150| fi Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:156:11: warning[SC3054]: In POSIX sh, array references are undefined. # 154| done | sort -Vr 2>/dev/null)) || : # 155| # 156|-> echo "${files[@]}" # 157| } # 158| Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:161:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 159| update_bls_cmdline() # 160| { # 161|-> local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" # 162| local -a files=($(get_sorted_bls)) # 163| Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:162:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 160| { # 161| local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" # 162|-> local -a files=($(get_sorted_bls)) # 163| # 164| if [ -w /etc/kernel ] && Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:162:20: warning[SC3030]: In POSIX sh, arrays are undefined. # 160| { # 161| local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" # 162|-> local -a files=($(get_sorted_bls)) # 163| # 164| if [ -w /etc/kernel ] && Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:162:21: warning[SC2046]: Quote this to prevent word splitting. # 160| { # 161| local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" # 162|-> local -a files=($(get_sorted_bls)) # 163| # 164| if [ -w /etc/kernel ] && Error: SHELLCHECK_WARNING (CWE-140): /etc/grub.d/10_linux:162:21: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # 160| { # 161| local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" # 162|-> local -a files=($(get_sorted_bls)) # 163| # 164| if [ -w /etc/kernel ] && Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:165:12: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 163| # 164| if [ -w /etc/kernel ] && # 165|-> [[ ! -f /etc/kernel/cmdline || # 166| /etc/kernel/cmdline -ot /etc/default/grub ]]; then # 167| # anaconda has the correct information to create this during install; Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:173:17: warning[SC3054]: In POSIX sh, array references are undefined. # 171| fi # 172| # 173|-> for bls in "${files[@]}"; do # 174| local options="${cmdline}" # 175| if [ -z "${bls##*debug*}" ]; then Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:174:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 172| # 173| for bls in "${files[@]}"; do # 174|-> local options="${cmdline}" # 175| if [ -z "${bls##*debug*}" ]; then # 176| options="${options} ${GRUB_CMDLINE_LINUX_DEBUG}" Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:185:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 183| populate_menu() # 184| { # 185|-> local -a files=($(get_sorted_bls)) # 186| # 187| gettext_printf "Generating boot entries from BLS files...\n" >&2 Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:185:20: warning[SC3030]: In POSIX sh, arrays are undefined. # 183| populate_menu() # 184| { # 185|-> local -a files=($(get_sorted_bls)) # 186| # 187| gettext_printf "Generating boot entries from BLS files...\n" >&2 Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:185:21: warning[SC2046]: Quote this to prevent word splitting. # 183| populate_menu() # 184| { # 185|-> local -a files=($(get_sorted_bls)) # 186| # 187| gettext_printf "Generating boot entries from BLS files...\n" >&2 Error: SHELLCHECK_WARNING (CWE-140): /etc/grub.d/10_linux:185:21: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # 183| populate_menu() # 184| { # 185|-> local -a files=($(get_sorted_bls)) # 186| # 187| gettext_printf "Generating boot entries from BLS files...\n" >&2 Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:189:17: warning[SC3054]: In POSIX sh, array references are undefined. # 187| gettext_printf "Generating boot entries from BLS files...\n" >&2 # 188| # 189|-> for bls in "${files[@]}"; do # 190| read_config "${blsdir}/${bls}.conf" # 191| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/10_linux:195:36: warning[SC2154]: boot_prefix is referenced but not assigned. # 193| menu="${menu}\t linux ${linux} ${options}\n" # 194| if [ -n "${initrd}" ] ; then # 195|-> menu="${menu}\t initrd ${boot_prefix}${initrd}\n" # 196| fi # 197| menu="${menu}}\n\n" Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:234:19: warning[SC3045]: In POSIX sh, read -d is undefined. # 232| # 233| if test -e ${petitboot_path}; then # 234|-> read -r -d '' petitboot_version < ${petitboot_path} # 235| petitboot_version="$(echo ${petitboot_version//v})" # 236| Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:235:37: warning[SC3060]: In POSIX sh, string replacement is undefined. # 233| if test -e ${petitboot_path}; then # 234| read -r -d '' petitboot_version < ${petitboot_path} # 235|-> petitboot_version="$(echo ${petitboot_version//v})" # 236| # 237| if test -n ${petitboot_version}; then Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:242:18: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 240| # 241| re='^[0-9]+$' # 242|-> if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] && # 243| ([[ ${major_version} -gt 1 ]] || # 244| [[ ${major_version} -eq 1 && Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:242:49: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 240| # 241| re='^[0-9]+$' # 242|-> if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] && # 243| ([[ ${major_version} -gt 1 ]] || # 244| [[ ${major_version} -eq 1 && Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:243:19: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 241| re='^[0-9]+$' # 242| if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] && # 243|-> ([[ ${major_version} -gt 1 ]] || # 244| [[ ${major_version} -eq 1 && # 245| ${minor_version} -ge 8 ]]); then Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:244:19: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 242| if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] && # 243| ([[ ${major_version} -gt 1 ]] || # 244|-> [[ ${major_version} -eq 1 && # 245| ${minor_version} -ge 8 ]]); then # 246| BLS_POPULATE_MENU="false" Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/10_linux:288:15: warning[SC2154]: grub_editenv is referenced but not assigned. # 286| blsdir=$(make_system_path_relative_to_its_root "${blsdir}") # 287| if [ "x${blsdir}" != "x/loader/entries" ] && [ "x${blsdir}" != "x/boot/loader/entries" ]; then # 288|-> ${grub_editenv} - set blsdir="${blsdir}" # 289| fi # 290| fi Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:310:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 308| mktitle () # 309| { # 310|-> local title_type # 311| local version # 312| local OS_NAME Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:311:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 309| { # 310| local title_type # 311|-> local version # 312| local OS_NAME # 313| local OS_VERS Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:312:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 310| local title_type # 311| local version # 312|-> local OS_NAME # 313| local OS_VERS # 314| Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:313:3: warning[SC3043]: In POSIX sh, 'local' is undefined. # 311| local version # 312| local OS_NAME # 313|-> local OS_VERS # 314| # 315| title_type=$1 && shift Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:318:19: warning[SC2046]: Quote this to prevent word splitting. # 316| version=$1 && shift # 317| # 318|-> OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" # 319| OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" # 320| Error: SHELLCHECK_WARNING (CWE-156): /etc/grub.d/10_linux:319:19: warning[SC2046]: Quote this to prevent word splitting. # 317| # 318| OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" # 319|-> OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" # 320| # 321| case $title_type in Error: SHELLCHECK_WARNING: /etc/grub.d/10_linux:331:8: warning[SC3037]: In POSIX sh, echo flags are undefined. # 329| ;; # 330| esac # 331|-> echo -n ${title} # 332| } # 333| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/10_linux:551:26: warning[SC2154]: grub_tab is referenced but not assigned. # 549| fi # 550| # 551|-> submenu_indentation="$grub_tab" # 552| # 553| if [ -z "$boot_device_id" ]; then Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_linux_xen:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix="/usr" # 21| exec_prefix="/usr" # 22| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_linux_xen:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix="/usr" # 21|-> exec_prefix="/usr" # 22| datarootdir="/usr/share" # 23| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/20_linux_xen:24:4: warning[SC2154]: pkgdatadir is referenced but not assigned. # 22| datarootdir="/usr/share" # 23| # 24|-> . "$pkgdatadir/grub-mkconfig_lib" # 25| # 26| export TEXTDOMAIN=grub Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/20_linux_xen:86:9: warning[SC2154]: grub_probe is referenced but not assigned. # 84| fi;; # 85| xzfs) # 86|-> rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` # 87| bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`" # 88| LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}" Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/20_linux_xen:257:9: warning[SC2154]: grub_file is referenced but not assigned. # 255| echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {" # 256| fi # 257|-> if ($grub_file --is-arm64-efi $current_xen); then # 258| xen_module="xen_boot" # 259| xen_loader="xen_hypervisor" Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/20_linux_xen:340:27: warning[SC2154]: grub_tab is referenced but not assigned. # 338| "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}" # 339| # 340|-> submenu_indentation="$grub_tab$grub_tab" # 341| # 342| if [ -z "$boot_device_id" ]; then Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_ppc_terminfo:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix=/usr # 21| exec_prefix=/usr # 22| bindir=/usr/bin Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_ppc_terminfo:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix=/usr # 21|-> exec_prefix=/usr # 22| bindir=/usr/bin # 23| libdir=/usr/lib Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_ppc_terminfo:22:1: warning[SC2034]: bindir appears unused. Verify use (or export if used externally). # 20| prefix=/usr # 21| exec_prefix=/usr # 22|-> bindir=/usr/bin # 23| libdir=/usr/lib # 24| . "/usr/share/grub/grub-mkconfig_lib" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/20_ppc_terminfo:23:1: warning[SC2034]: libdir appears unused. Verify use (or export if used externally). # 21| exec_prefix=/usr # 22| bindir=/usr/bin # 23|-> libdir=/usr/lib # 24| . "/usr/share/grub/grub-mkconfig_lib" # 25| Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/30_os-prober:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix="/usr" # 21| exec_prefix="/usr" # 22| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/30_os-prober:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix="/usr" # 21|-> exec_prefix="/usr" # 22| datarootdir="/usr/share" # 23| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:27:4: warning[SC2154]: pkgdatadir is referenced but not assigned. # 25| export TEXTDOMAINDIR="${datarootdir}/locale" # 26| # 27|-> . "$pkgdatadir/grub-mkconfig_lib" # 28| # 29| if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then Error: SHELLCHECK_WARNING (CWE-685): /etc/grub.d/30_os-prober:44:1: warning[SC2120]: osx_entry references arguments, but none are ever passed. # 42| fi # 43| # 44|-> osx_entry() { # 45| found_other_os=1 # 46| # TRANSLATORS: it refers on the OS residing on device %s Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:49:19: warning[SC2154]: grub_probe is referenced but not assigned. # 47| onstr="$(gettext_printf "(on %s)" "${DEVICE}")" # 48| hints="" # 49|-> for hint in `"${grub_probe}" --device ${device} --target=efi_hints 2> /dev/null` ; do # 50| hints="${hints} --hint=${hint}" # 51| done Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:49:43: warning[SC2154]: device is referenced but not assigned (did you mean 'DEVICE'?). # 47| onstr="$(gettext_printf "(on %s)" "${DEVICE}")" # 48| hints="" # 49|-> for hint in `"${grub_probe}" --device ${device} --target=efi_hints 2> /dev/null` ; do # 50| hints="${hints} --hint=${hint}" # 51| done Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:230:35: warning[SC2154]: grub_tab is referenced but not assigned. # 228| menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' { # 229| EOF # 230|-> save_default_entry | sed -e "s/^/$grub_tab$grub_tab/" # 231| printf '%s\n' "${prepare_boot_cache}" | grub_add_tab # 232| cat << EOF Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:247:241: warning[SC2154]: version is referenced but not assigned. # 245| quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" # 246| title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" # 247|-> grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" # 248| fi # 249| done Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_os-prober:247:250: warning[SC2154]: type is referenced but not assigned (for output from commands, use "$(type ...)" ). # 245| quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" # 246| title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;" # 247|-> grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")" # 248| fi # 249| done Error: SHELLCHECK_WARNING: /etc/grub.d/30_os-prober:258:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined. # 256| for subdevice in ${DEVICE%[[:digit:]]*}* ; do # 257| parttype="`"${grub_probe}" --device ${device} --target=gpt_parttype "${subdevice}" 2> /dev/null`" # 258|-> if [[ "$parttype" = "426f6f74-0000-11aa-aa11-00306543ecac" ]]; then # 259| DEVICE="${subdevice}" osx_entry # 260| fi Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/30_uefi-firmware:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # along with GRUB. If not, see <http://www.gnu.org/licenses/>. # 19| # 20|-> prefix="/usr" # 21| exec_prefix="/usr" # 22| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /etc/grub.d/30_uefi-firmware:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # 20| prefix="/usr" # 21|-> exec_prefix="/usr" # 22| datarootdir="/usr/share" # 23| Error: SHELLCHECK_WARNING (CWE-457): /etc/grub.d/30_uefi-firmware:27:4: warning[SC2154]: pkgdatadir is referenced but not assigned. # 25| export TEXTDOMAINDIR="${datarootdir}/locale" # 26| # 27|-> . "$pkgdatadir/grub-mkconfig_lib" # 28| # 29| LABEL="UEFI Firmware Settings" Error: SHELLCHECK_WARNING (CWE-563): /usr/bin/grub2-kbdcomp:3:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 1| #!/usr/bin/sh # 2| # 3|-> prefix="/usr" # 4| exec_prefix="/usr" # 5| bindir="/usr/bin" Error: SHELLCHECK_WARNING (CWE-563): /usr/bin/grub2-kbdcomp:4:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 2| # 3| prefix="/usr" # 4|-> exec_prefix="/usr" # 5| bindir="/usr/bin" # 6| datarootdir="/usr/share" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:4:1: warning[SC2034]: grub_modinfo_target_cpu appears unused. Verify use (or export if used externally). # 2| # 3| # User-controllable options # 4|-> grub_modinfo_target_cpu=i386 # 5| grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:5:1: warning[SC2034]: grub_modinfo_platform appears unused. Verify use (or export if used externally). # 3| # User-controllable options # 4| grub_modinfo_target_cpu=i386 # 5|-> grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:6:1: warning[SC2034]: grub_disk_cache_stats appears unused. Verify use (or export if used externally). # 4| grub_modinfo_target_cpu=i386 # 5| grub_modinfo_platform=efi # 6|-> grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8| grub_have_font_source=1 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:7:1: warning[SC2034]: grub_boot_time_stats appears unused. Verify use (or export if used externally). # 5| grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 # 7|-> grub_boot_time_stats=0 # 8| grub_have_font_source=1 # 9| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:8:1: warning[SC2034]: grub_have_font_source appears unused. Verify use (or export if used externally). # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8|-> grub_have_font_source=1 # 9| # 10| # Autodetected config Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:11:1: warning[SC2034]: grub_have_asm_uscore appears unused. Verify use (or export if used externally). # 9| # 10| # Autodetected config # 11|-> grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="__bss_start" # 13| grub_end_symbol="end" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:12:1: warning[SC2034]: grub_bss_start_symbol appears unused. Verify use (or export if used externally). # 10| # Autodetected config # 11| grub_have_asm_uscore=0 # 12|-> grub_bss_start_symbol="__bss_start" # 13| grub_end_symbol="end" # 14| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:13:1: warning[SC2034]: grub_end_symbol appears unused. Verify use (or export if used externally). # 11| grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="__bss_start" # 13|-> grub_end_symbol="end" # 14| # 15| # Build environment Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:16:1: warning[SC2034]: grub_target_cc appears unused. Verify use (or export if used externally). # 14| # 15| # Build environment # 16|-> grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] /usr/lib/grub/i386-efi/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:17:1: warning[SC2034]: grub_target_cc_version appears unused. Verify use (or export if used externally). # 15| # Build environment # 16| grub_target_cc='gcc' # 17|-> grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' /usr/lib/grub/i386-efi/modinfo.sh:17:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:18:1: warning[SC2034]: grub_target_cflags appears unused. Verify use (or export if used externally). # 16| grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18|-> grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' /usr/lib/grub/i386-efi/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:19:1: warning[SC2034]: grub_target_cppflags appears unused. Verify use (or export if used externally). # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' /usr/lib/grub/i386-efi/modinfo.sh:19:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:20:1: warning[SC2034]: grub_target_ccasflags appears unused. Verify use (or export if used externally). # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20|-> grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' /usr/lib/grub/i386-efi/modinfo.sh:20:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:21:1: warning[SC2034]: grub_target_ldflags appears unused. Verify use (or export if used externally). # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' # 21|-> grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' # 23| grub_cppflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:22:1: warning[SC2034]: grub_cflags appears unused. Verify use (or export if used externally). # 20| grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22|-> grub_cflags='' # 23| grub_cppflags='' # 24| grub_ccasflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:23:1: warning[SC2034]: grub_cppflags appears unused. Verify use (or export if used externally). # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' # 23|-> grub_cppflags='' # 24| grub_ccasflags='' # 25| grub_ldflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:24:1: warning[SC2034]: grub_ccasflags appears unused. Verify use (or export if used externally). # 22| grub_cflags='' # 23| grub_cppflags='' # 24|-> grub_ccasflags='' # 25| grub_ldflags='' # 26| grub_target_strip='strip' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:25:1: warning[SC2034]: grub_ldflags appears unused. Verify use (or export if used externally). # 23| grub_cppflags='' # 24| grub_ccasflags='' # 25|-> grub_ldflags='' # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:26:1: warning[SC2034]: grub_target_strip appears unused. Verify use (or export if used externally). # 24| grub_ccasflags='' # 25| grub_ldflags='' # 26|-> grub_target_strip='strip' # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:27:1: warning[SC2034]: grub_target_nm appears unused. Verify use (or export if used externally). # 25| grub_ldflags='' # 26| grub_target_strip='strip' # 27|-> grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:28:1: warning[SC2034]: grub_target_ranlib appears unused. Verify use (or export if used externally). # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' # 28|-> grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:29:1: warning[SC2034]: grub_target_objconf appears unused. Verify use (or export if used externally). # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29|-> grub_target_objconf='' # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:30:1: warning[SC2034]: grub_target_obj2elf appears unused. Verify use (or export if used externally). # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30|-> grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:31:1: warning[SC2034]: grub_target_img_base_ldopt appears unused. Verify use (or export if used externally). # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' # 31|-> grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:32:1: warning[SC2034]: grub_target_img_ldflags appears unused. Verify use (or export if used externally). # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32|-> grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| # 34| # Version Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:35:1: warning[SC2034]: grub_version appears unused. Verify use (or export if used externally). # 33| # 34| # Version # 35|-> grub_version="2.06" # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:36:1: warning[SC2034]: grub_package appears unused. Verify use (or export if used externally). # 34| # Version # 35| grub_version="2.06" # 36|-> grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:37:1: warning[SC2034]: grub_package_string appears unused. Verify use (or export if used externally). # 35| grub_version="2.06" # 36| grub_package="grub" # 37|-> grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:38:1: warning[SC2034]: grub_package_version appears unused. Verify use (or export if used externally). # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38|-> grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:39:1: warning[SC2034]: grub_package_name appears unused. Verify use (or export if used externally). # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39|-> grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-efi/modinfo.sh:40:1: warning[SC2034]: grub_package_bugreport appears unused. Verify use (or export if used externally). # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40|-> grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:4:1: warning[SC2034]: grub_modinfo_target_cpu appears unused. Verify use (or export if used externally). # 2| # 3| # User-controllable options # 4|-> grub_modinfo_target_cpu=i386 # 5| grub_modinfo_platform=pc # 6| grub_disk_cache_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:5:1: warning[SC2034]: grub_modinfo_platform appears unused. Verify use (or export if used externally). # 3| # User-controllable options # 4| grub_modinfo_target_cpu=i386 # 5|-> grub_modinfo_platform=pc # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:6:1: warning[SC2034]: grub_disk_cache_stats appears unused. Verify use (or export if used externally). # 4| grub_modinfo_target_cpu=i386 # 5| grub_modinfo_platform=pc # 6|-> grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8| grub_have_font_source=1 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:7:1: warning[SC2034]: grub_boot_time_stats appears unused. Verify use (or export if used externally). # 5| grub_modinfo_platform=pc # 6| grub_disk_cache_stats=0 # 7|-> grub_boot_time_stats=0 # 8| grub_have_font_source=1 # 9| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:8:1: warning[SC2034]: grub_have_font_source appears unused. Verify use (or export if used externally). # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8|-> grub_have_font_source=1 # 9| # 10| # Autodetected config Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:11:1: warning[SC2034]: grub_have_asm_uscore appears unused. Verify use (or export if used externally). # 9| # 10| # Autodetected config # 11|-> grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="__bss_start" # 13| grub_end_symbol="end" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:12:1: warning[SC2034]: grub_bss_start_symbol appears unused. Verify use (or export if used externally). # 10| # Autodetected config # 11| grub_have_asm_uscore=0 # 12|-> grub_bss_start_symbol="__bss_start" # 13| grub_end_symbol="end" # 14| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:13:1: warning[SC2034]: grub_end_symbol appears unused. Verify use (or export if used externally). # 11| grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="__bss_start" # 13|-> grub_end_symbol="end" # 14| # 15| # Build environment Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:16:1: warning[SC2034]: grub_target_cc appears unused. Verify use (or export if used externally). # 14| # 15| # Build environment # 16|-> grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] /usr/lib/grub/i386-pc/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:17:1: warning[SC2034]: grub_target_cc_version appears unused. Verify use (or export if used externally). # 15| # Build environment # 16| grub_target_cc='gcc' # 17|-> grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-pc-2.06 -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' /usr/lib/grub/i386-pc/modinfo.sh:17:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:18:1: warning[SC2034]: grub_target_cflags appears unused. Verify use (or export if used externally). # 16| grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18|-> grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-pc-2.06 -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' /usr/lib/grub/i386-pc/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:19:1: warning[SC2034]: grub_target_cppflags appears unused. Verify use (or export if used externally). # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-pc-2.06 -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags=' -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' /usr/lib/grub/i386-pc/modinfo.sh:19:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:20:1: warning[SC2034]: grub_target_ccasflags appears unused. Verify use (or export if used externally). # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-pc-2.06 -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20|-> grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags=' -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' /usr/lib/grub/i386-pc/modinfo.sh:20:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:21:1: warning[SC2034]: grub_target_ldflags appears unused. Verify use (or export if used externally). # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-i386-pc-2.06 -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m32 -g ' # 21|-> grub_target_ldflags=' -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' # 23| grub_cppflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:22:1: warning[SC2034]: grub_cflags appears unused. Verify use (or export if used externally). # 20| grub_target_ccasflags=' -m32 -g ' # 21| grub_target_ldflags=' -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22|-> grub_cflags='' # 23| grub_cppflags='' # 24| grub_ccasflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:23:1: warning[SC2034]: grub_cppflags appears unused. Verify use (or export if used externally). # 21| grub_target_ldflags=' -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m32 -Wl,-melf_i386 -Wl,--build-id=none' # 22| grub_cflags='' # 23|-> grub_cppflags='' # 24| grub_ccasflags='' # 25| grub_ldflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:24:1: warning[SC2034]: grub_ccasflags appears unused. Verify use (or export if used externally). # 22| grub_cflags='' # 23| grub_cppflags='' # 24|-> grub_ccasflags='' # 25| grub_ldflags='' # 26| grub_target_strip='strip' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:25:1: warning[SC2034]: grub_ldflags appears unused. Verify use (or export if used externally). # 23| grub_cppflags='' # 24| grub_ccasflags='' # 25|-> grub_ldflags='' # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:26:1: warning[SC2034]: grub_target_strip appears unused. Verify use (or export if used externally). # 24| grub_ccasflags='' # 25| grub_ldflags='' # 26|-> grub_target_strip='strip' # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:27:1: warning[SC2034]: grub_target_nm appears unused. Verify use (or export if used externally). # 25| grub_ldflags='' # 26| grub_target_strip='strip' # 27|-> grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:28:1: warning[SC2034]: grub_target_ranlib appears unused. Verify use (or export if used externally). # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' # 28|-> grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:29:1: warning[SC2034]: grub_target_objconf appears unused. Verify use (or export if used externally). # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29|-> grub_target_objconf='' # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:30:1: warning[SC2034]: grub_target_obj2elf appears unused. Verify use (or export if used externally). # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30|-> grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:31:1: warning[SC2034]: grub_target_img_base_ldopt appears unused. Verify use (or export if used externally). # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' # 31|-> grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:32:1: warning[SC2034]: grub_target_img_ldflags appears unused. Verify use (or export if used externally). # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32|-> grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| # 34| # Version Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:35:1: warning[SC2034]: grub_version appears unused. Verify use (or export if used externally). # 33| # 34| # Version # 35|-> grub_version="2.06" # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:36:1: warning[SC2034]: grub_package appears unused. Verify use (or export if used externally). # 34| # Version # 35| grub_version="2.06" # 36|-> grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:37:1: warning[SC2034]: grub_package_string appears unused. Verify use (or export if used externally). # 35| grub_version="2.06" # 36| grub_package="grub" # 37|-> grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:38:1: warning[SC2034]: grub_package_version appears unused. Verify use (or export if used externally). # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38|-> grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:39:1: warning[SC2034]: grub_package_name appears unused. Verify use (or export if used externally). # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39|-> grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/i386-pc/modinfo.sh:40:1: warning[SC2034]: grub_package_bugreport appears unused. Verify use (or export if used externally). # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40|-> grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:4:1: warning[SC2034]: grub_modinfo_target_cpu appears unused. Verify use (or export if used externally). # 2| # 3| # User-controllable options # 4|-> grub_modinfo_target_cpu=x86_64 # 5| grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:5:1: warning[SC2034]: grub_modinfo_platform appears unused. Verify use (or export if used externally). # 3| # User-controllable options # 4| grub_modinfo_target_cpu=x86_64 # 5|-> grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:6:1: warning[SC2034]: grub_disk_cache_stats appears unused. Verify use (or export if used externally). # 4| grub_modinfo_target_cpu=x86_64 # 5| grub_modinfo_platform=efi # 6|-> grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8| grub_have_font_source=1 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:7:1: warning[SC2034]: grub_boot_time_stats appears unused. Verify use (or export if used externally). # 5| grub_modinfo_platform=efi # 6| grub_disk_cache_stats=0 # 7|-> grub_boot_time_stats=0 # 8| grub_have_font_source=1 # 9| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:8:1: warning[SC2034]: grub_have_font_source appears unused. Verify use (or export if used externally). # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8|-> grub_have_font_source=1 # 9| # 10| # Autodetected config Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:11:1: warning[SC2034]: grub_have_asm_uscore appears unused. Verify use (or export if used externally). # 9| # 10| # Autodetected config # 11|-> grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="" # 13| grub_end_symbol="" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:12:1: warning[SC2034]: grub_bss_start_symbol appears unused. Verify use (or export if used externally). # 10| # Autodetected config # 11| grub_have_asm_uscore=0 # 12|-> grub_bss_start_symbol="" # 13| grub_end_symbol="" # 14| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:13:1: warning[SC2034]: grub_end_symbol appears unused. Verify use (or export if used externally). # 11| grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="" # 13|-> grub_end_symbol="" # 14| # 15| # Build environment Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:16:1: warning[SC2034]: grub_target_cc appears unused. Verify use (or export if used externally). # 14| # 15| # Build environment # 16|-> grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-functio [...] /usr/lib/grub/x86_64-efi/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:17:1: warning[SC2034]: grub_target_cc_version appears unused. Verify use (or export if used externally). # 15| # Build environment # 16| grub_target_cc='gcc' # 17|-> grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-functio [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-x86_64-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' /usr/lib/grub/x86_64-efi/modinfo.sh:17:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:18:1: warning[SC2034]: grub_target_cflags appears unused. Verify use (or export if used externally). # 16| grub_target_cc='gcc' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18|-> grub_target_cflags='-std=gnu99 -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-functio [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-x86_64-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m64 -g ' /usr/lib/grub/x86_64-efi/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:19:1: warning[SC2034]: grub_target_cppflags appears unused. Verify use (or export if used externally). # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-functio [...] # 19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-x86_64-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m64 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m64 -Wl,-melf_x86_64 -Wl,--build-id=none' /usr/lib/grub/x86_64-efi/modinfo.sh:19:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:20:1: warning[SC2034]: grub_target_ccasflags appears unused. Verify use (or export if used externally). # 18| grub_target_cflags='-std=gnu99 -fno-strict-aliasing -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -m64 -march=x86-64 -mtune=generic -fstack-clash-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-functio [...] # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-x86_64-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20|-> grub_target_ccasflags=' -m64 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m64 -Wl,-melf_x86_64 -Wl,--build-id=none' # 22| grub_cflags='' /usr/lib/grub/x86_64-efi/modinfo.sh:20:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:21:1: warning[SC2034]: grub_target_ldflags appears unused. Verify use (or export if used externally). # 19| grub_target_cppflags='-I/builddir/build/BUILD/grub-2.06/grub-x86_64-efi-2.06 -Wall -W -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/14/include -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -m64 -g ' # 21|-> grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m64 -Wl,-melf_x86_64 -Wl,--build-id=none' # 22| grub_cflags='' # 23| grub_cppflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:22:1: warning[SC2034]: grub_cflags appears unused. Verify use (or export if used externally). # 20| grub_target_ccasflags=' -m64 -g ' # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m64 -Wl,-melf_x86_64 -Wl,--build-id=none' # 22|-> grub_cflags='' # 23| grub_cppflags='' # 24| grub_ccasflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:23:1: warning[SC2034]: grub_cppflags appears unused. Verify use (or export if used externally). # 21| grub_target_ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--build-id=sha1 -Wl,--no-warn-rwx-segments -static -m64 -Wl,-melf_x86_64 -Wl,--build-id=none' # 22| grub_cflags='' # 23|-> grub_cppflags='' # 24| grub_ccasflags='' # 25| grub_ldflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:24:1: warning[SC2034]: grub_ccasflags appears unused. Verify use (or export if used externally). # 22| grub_cflags='' # 23| grub_cppflags='' # 24|-> grub_ccasflags='' # 25| grub_ldflags='' # 26| grub_target_strip='strip' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:25:1: warning[SC2034]: grub_ldflags appears unused. Verify use (or export if used externally). # 23| grub_cppflags='' # 24| grub_ccasflags='' # 25|-> grub_ldflags='' # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:26:1: warning[SC2034]: grub_target_strip appears unused. Verify use (or export if used externally). # 24| grub_ccasflags='' # 25| grub_ldflags='' # 26|-> grub_target_strip='strip' # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:27:1: warning[SC2034]: grub_target_nm appears unused. Verify use (or export if used externally). # 25| grub_ldflags='' # 26| grub_target_strip='strip' # 27|-> grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:28:1: warning[SC2034]: grub_target_ranlib appears unused. Verify use (or export if used externally). # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' # 28|-> grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:29:1: warning[SC2034]: grub_target_objconf appears unused. Verify use (or export if used externally). # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29|-> grub_target_objconf='' # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:30:1: warning[SC2034]: grub_target_obj2elf appears unused. Verify use (or export if used externally). # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30|-> grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:31:1: warning[SC2034]: grub_target_img_base_ldopt appears unused. Verify use (or export if used externally). # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' # 31|-> grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:32:1: warning[SC2034]: grub_target_img_ldflags appears unused. Verify use (or export if used externally). # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32|-> grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| # 34| # Version Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:35:1: warning[SC2034]: grub_version appears unused. Verify use (or export if used externally). # 33| # 34| # Version # 35|-> grub_version="2.06" # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:36:1: warning[SC2034]: grub_package appears unused. Verify use (or export if used externally). # 34| # Version # 35| grub_version="2.06" # 36|-> grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:37:1: warning[SC2034]: grub_package_string appears unused. Verify use (or export if used externally). # 35| grub_version="2.06" # 36| grub_package="grub" # 37|-> grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:38:1: warning[SC2034]: grub_package_version appears unused. Verify use (or export if used externally). # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38|-> grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:39:1: warning[SC2034]: grub_package_name appears unused. Verify use (or export if used externally). # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39|-> grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-efi/modinfo.sh:40:1: warning[SC2034]: grub_package_bugreport appears unused. Verify use (or export if used externally). # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40|-> grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:4:1: warning[SC2034]: grub_modinfo_target_cpu appears unused. Verify use (or export if used externally). # 2| # 3| # User-controllable options # 4|-> grub_modinfo_target_cpu=x86_64 # 5| grub_modinfo_platform=emu # 6| grub_disk_cache_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:5:1: warning[SC2034]: grub_modinfo_platform appears unused. Verify use (or export if used externally). # 3| # User-controllable options # 4| grub_modinfo_target_cpu=x86_64 # 5|-> grub_modinfo_platform=emu # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:6:1: warning[SC2034]: grub_disk_cache_stats appears unused. Verify use (or export if used externally). # 4| grub_modinfo_target_cpu=x86_64 # 5| grub_modinfo_platform=emu # 6|-> grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8| grub_have_font_source=1 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:7:1: warning[SC2034]: grub_boot_time_stats appears unused. Verify use (or export if used externally). # 5| grub_modinfo_platform=emu # 6| grub_disk_cache_stats=0 # 7|-> grub_boot_time_stats=0 # 8| grub_have_font_source=1 # 9| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:8:1: warning[SC2034]: grub_have_font_source appears unused. Verify use (or export if used externally). # 6| grub_disk_cache_stats=0 # 7| grub_boot_time_stats=0 # 8|-> grub_have_font_source=1 # 9| # 10| # Autodetected config Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:11:1: warning[SC2034]: grub_have_asm_uscore appears unused. Verify use (or export if used externally). # 9| # 10| # Autodetected config # 11|-> grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="" # 13| grub_end_symbol="" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:12:1: warning[SC2034]: grub_bss_start_symbol appears unused. Verify use (or export if used externally). # 10| # Autodetected config # 11| grub_have_asm_uscore=0 # 12|-> grub_bss_start_symbol="" # 13| grub_end_symbol="" # 14| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:13:1: warning[SC2034]: grub_end_symbol appears unused. Verify use (or export if used externally). # 11| grub_have_asm_uscore=0 # 12| grub_bss_start_symbol="" # 13|-> grub_end_symbol="" # 14| # 15| # Build environment Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:16:1: warning[SC2034]: grub_target_cc appears unused. Verify use (or export if used externally). # 14| # 15| # Build environment # 16|-> grub_target_cc='gcc -fPIE -Wl,-z,noexecstack -Wl,--no-warn-rwx-segments' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-labe [...] /usr/lib/grub/x86_64-emu/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:17:1: warning[SC2034]: grub_target_cc_version appears unused. Verify use (or export if used externally). # 15| # Build environment # 16| grub_target_cc='gcc -fPIE -Wl,-z,noexecstack -Wl,--no-warn-rwx-segments' # 17|-> grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-labe [...] # 19| grub_target_cppflags=' -Wall -W -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=X86_64_EMU -I$(top_srcdir)/include -I$(top_builddir)/include' /usr/lib/grub/x86_64-emu/modinfo.sh:17:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:18:1: warning[SC2034]: grub_target_cflags appears unused. Verify use (or export if used externally). # 16| grub_target_cc='gcc -fPIE -Wl,-z,noexecstack -Wl,--no-warn-rwx-segments' # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18|-> grub_target_cflags='-std=gnu99 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-labe [...] # 19| grub_target_cppflags=' -Wall -W -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=X86_64_EMU -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -g -fno-PIE -fno-pie' /usr/lib/grub/x86_64-emu/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:19:1: warning[SC2034]: grub_target_cppflags appears unused. Verify use (or export if used externally). # 17| grub_target_cc_version='gcc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)' # 18| grub_target_cflags='-std=gnu99 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-labe [...] # 19|-> grub_target_cppflags=' -Wall -W -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=X86_64_EMU -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -g -fno-PIE -fno-pie' # 21| grub_target_ldflags=' -no-pie -Wl,--build-id=none' /usr/lib/grub/x86_64-emu/modinfo.sh:19:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:20:1: warning[SC2034]: grub_target_ccasflags appears unused. Verify use (or export if used externally). # 18| grub_target_cflags='-std=gnu99 -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-labe [...] # 19| grub_target_cppflags=' -Wall -W -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=X86_64_EMU -I$(top_srcdir)/include -I$(top_builddir)/include' # 20|-> grub_target_ccasflags=' -g -fno-PIE -fno-pie' # 21| grub_target_ldflags=' -no-pie -Wl,--build-id=none' # 22| grub_cflags='' /usr/lib/grub/x86_64-emu/modinfo.sh:20:1: note: trimmed 1 message(s) with length over 512 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:21:1: warning[SC2034]: grub_target_ldflags appears unused. Verify use (or export if used externally). # 19| grub_target_cppflags=' -Wall -W -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=X86_64_EMU -I$(top_srcdir)/include -I$(top_builddir)/include' # 20| grub_target_ccasflags=' -g -fno-PIE -fno-pie' # 21|-> grub_target_ldflags=' -no-pie -Wl,--build-id=none' # 22| grub_cflags='' # 23| grub_cppflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:22:1: warning[SC2034]: grub_cflags appears unused. Verify use (or export if used externally). # 20| grub_target_ccasflags=' -g -fno-PIE -fno-pie' # 21| grub_target_ldflags=' -no-pie -Wl,--build-id=none' # 22|-> grub_cflags='' # 23| grub_cppflags='' # 24| grub_ccasflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:23:1: warning[SC2034]: grub_cppflags appears unused. Verify use (or export if used externally). # 21| grub_target_ldflags=' -no-pie -Wl,--build-id=none' # 22| grub_cflags='' # 23|-> grub_cppflags='' # 24| grub_ccasflags='' # 25| grub_ldflags='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:24:1: warning[SC2034]: grub_ccasflags appears unused. Verify use (or export if used externally). # 22| grub_cflags='' # 23| grub_cppflags='' # 24|-> grub_ccasflags='' # 25| grub_ldflags='' # 26| grub_target_strip='strip' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:25:1: warning[SC2034]: grub_ldflags appears unused. Verify use (or export if used externally). # 23| grub_cppflags='' # 24| grub_ccasflags='' # 25|-> grub_ldflags='' # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:26:1: warning[SC2034]: grub_target_strip appears unused. Verify use (or export if used externally). # 24| grub_ccasflags='' # 25| grub_ldflags='' # 26|-> grub_target_strip='strip' # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:27:1: warning[SC2034]: grub_target_nm appears unused. Verify use (or export if used externally). # 25| grub_ldflags='' # 26| grub_target_strip='strip' # 27|-> grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:28:1: warning[SC2034]: grub_target_ranlib appears unused. Verify use (or export if used externally). # 26| grub_target_strip='strip' # 27| grub_target_nm='nm' # 28|-> grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:29:1: warning[SC2034]: grub_target_objconf appears unused. Verify use (or export if used externally). # 27| grub_target_nm='nm' # 28| grub_target_ranlib='ranlib' # 29|-> grub_target_objconf='' # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:30:1: warning[SC2034]: grub_target_obj2elf appears unused. Verify use (or export if used externally). # 28| grub_target_ranlib='ranlib' # 29| grub_target_objconf='' # 30|-> grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:31:1: warning[SC2034]: grub_target_img_base_ldopt appears unused. Verify use (or export if used externally). # 29| grub_target_objconf='' # 30| grub_target_obj2elf='' # 31|-> grub_target_img_base_ldopt='-Wl,-Ttext' # 32| grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:32:1: warning[SC2034]: grub_target_img_ldflags appears unused. Verify use (or export if used externally). # 30| grub_target_obj2elf='' # 31| grub_target_img_base_ldopt='-Wl,-Ttext' # 32|-> grub_target_img_ldflags='@TARGET_IMG_BASE_LDFLAGS@' # 33| # 34| # Version Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:35:1: warning[SC2034]: grub_version appears unused. Verify use (or export if used externally). # 33| # 34| # Version # 35|-> grub_version="2.06" # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:36:1: warning[SC2034]: grub_package appears unused. Verify use (or export if used externally). # 34| # Version # 35| grub_version="2.06" # 36|-> grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:37:1: warning[SC2034]: grub_package_string appears unused. Verify use (or export if used externally). # 35| grub_version="2.06" # 36| grub_package="grub" # 37|-> grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:38:1: warning[SC2034]: grub_package_version appears unused. Verify use (or export if used externally). # 36| grub_package="grub" # 37| grub_package_string="GRUB 2.06" # 38|-> grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:39:1: warning[SC2034]: grub_package_name appears unused. Verify use (or export if used externally). # 37| grub_package_string="GRUB 2.06" # 38| grub_package_version="2.06" # 39|-> grub_package_name="GRUB" # 40| grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/grub/x86_64-emu/modinfo.sh:40:1: warning[SC2034]: grub_package_bugreport appears unused. Verify use (or export if used externally). # 38| grub_package_version="2.06" # 39| grub_package_name="GRUB" # 40|-> grub_package_bugreport="bug-grub@gnu.org" Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/kernel/install.d/20-grub.install:29:11: warning[SC2034]: datetime appears unused. Verify use (or export if used externally). # 27| mkbls() { # 28| local kernelver=$1 && shift # 29|-> local datetime=$1 && shift # 30| local kernelopts=$1 && shift # 31| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/kernel/install.d/20-grub.install:121:42: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 119| # 120| eval "$(grub2-get-kernel-settings)" || true # 121|-> [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR" # 122| BLS_ID="${MACHINE_ID}-${KERNEL_VERSION}" # 123| BLS_TARGET="${BLS_DIR}/${BLS_ID}.conf" Error: SHELLCHECK_WARNING (CWE-156): /usr/lib/kernel/install.d/20-grub.install:131:43: warning[SC2046]: Quote this to prevent word splitting. # 129| LINUX="$(grep '^linux[ \t]' "${BLS_TARGET}" | sed -e 's,^linux[ \t]*,,')" # 130| INITRD="$(grep '^initrd[ \t]' "${BLS_TARGET}" | sed -e 's,^initrd[ \t]*,,')" # 131|-> if [[ "$(grub2-probe --device $(grub2-probe --target=device /) --target=fs)" == "btrfs" && # 132| "${SUSE_BTRFS_SNAPSHOT_BOOTING}" == "true" ]]; then # 133| LINUX_RELPATH="$(grub2-mkrelpath -r /boot${LINUX})" Error: SHELLCHECK_WARNING (CWE-153): /usr/lib/kernel/install.d/20-grub.install:140:29: warning[SC2053]: Quote the right-hand side of != in [[ ]] to prevent glob matching. # 138| ROOTPREFIX="$(dirname "/boot${LINUX}")" # 139| # 140|-> if [[ $LINUX != $LINUX_RELPATH ]]; then # 141| sed -i -e "s,^linux.*,linux ${BOOTPREFIX}${LINUX},g" "${BLS_TARGET}" # 142| sed -i -e "s,^initrd.*,initrd ${BOOTPREFIX}${INITRD},g" "${BLS_TARGET}" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/kernel/install.d/20-grub.install:164:39: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 162| sed -i -e "s/^title.*/title ${TITLE}${GRUB_LINUX_DEBUG_TITLE_POSTFIX}/" "${BLS_DEBUG}" # 163| sed -i -e "s/^options.*/options ${OPTIONS}/" "${BLS_DEBUG}" # 164|-> if [ -n "$NEWDEFAULT" -a "x$GRUB_DEFAULT_TO_DEBUG" = "xtrue" ]; then # 165| NEWDEFAULT="${BLS_DEBUG_ID}" # 166| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/kernel/install.d/20-grub.install:173:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 171| # 172| # this probably isn't the best place to do this, but it will do for now. # 173|-> if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \ # 174| "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \ # 175| -x /usr/lib/kernel/install.d/50-dracut.install ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/kernel/install.d/20-grub.install:173:76: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 171| # 172| # this probably isn't the best place to do this, but it will do for now. # 173|-> if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \ # 174| "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \ # 175| -x /usr/lib/kernel/install.d/50-dracut.install ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/kernel/install.d/20-grub.install:174:71: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 172| # this probably isn't the best place to do this, but it will do for now. # 173| if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \ # 174|-> "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \ # 175| -x /usr/lib/kernel/install.d/50-dracut.install ]; then # 176| rm -f "${ROOTPREFIX}${INITRD}" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-get-kernel-settings:71:26: warning[SC3060]: In POSIX sh, string replacement is undefined. # 69| fi # 70| # 71|-> GRUB_DEFAULT_KERNEL_TYPE=${DEFAULTKERNEL/-core/} # 72| if [ "$GRUB_DEFAULT_KERNEL_TYPE" != "kernel" ]; then # 73| echo GRUB_NON_STANDARD_KERNEL=true Error: SHELLCHECK_WARNING: /usr/sbin/grub2-get-kernel-settings:75:30: warning[SC3060]: In POSIX sh, string replacement is undefined. # 73| echo GRUB_NON_STANDARD_KERNEL=true # 74| echo export GRUB_NON_STANDARD_KERNEL # 75|-> GRUB_DEFAULT_KERNEL_TYPE=${GRUB_DEFAULT_KERNEL_TYPE/kernel-/} # 76| fi # 77| echo GRUB_DEFAULT_KERNEL_TYPE=$GRUB_DEFAULT_KERNEL_TYPE Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-mkconfig:24:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 22| datarootdir="/usr/share" # 23| # 24|-> prefix="/usr" # 25| exec_prefix="/usr" # 26| sbindir="/usr/sbin" Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-mkconfig:25:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 23| # 24| prefix="/usr" # 25|-> exec_prefix="/usr" # 26| sbindir="/usr/sbin" # 27| bindir="/usr/bin" Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-mkconfig:31:1: warning[SC2034]: host_os appears unused. Verify use (or export if used externally). # 29| PACKAGE_NAME=GRUB # 30| PACKAGE_VERSION=2.06 # 31|-> host_os=linux-gnu # 32| datadir="/usr/share" # 33| if [ "x$pkgdatadir" = x ]; then Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-mkconfig:45:1: warning[SC2034]: grub_file appears unused. Verify use (or export if used externally). # 43| # 44| grub_probe="${sbindir}/grub2-probe" # 45|-> grub_file="${bindir}/grub2-file" # 46| grub_editenv="${bindir}/grub2-editenv" # 47| grub_script_check="${bindir}/grub2-script-check" Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-mkconfig:188:5: warning[SC2034]: termoutdefault appears unused. Verify use (or export if used externally). # 186| if [ "x${GRUB_TERMINAL_OUTPUT}" = "x" ]; then # 187| GRUB_TERMINAL_OUTPUT=gfxterm; # 188|-> termoutdefault=1; # 189| fi # 190| Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-reboot:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # 19| # Initialize some variables. # 20|-> prefix=/usr # 21| exec_prefix=/usr # 22| bindir=/usr/bin Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-reboot:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # Initialize some variables. # 20| prefix=/usr # 21|-> exec_prefix=/usr # 22| bindir=/usr/bin # 23| sbindir=/usr/sbin Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-reboot:24:1: warning[SC2034]: sysconfdir appears unused. Verify use (or export if used externally). # 22| bindir=/usr/bin # 23| sbindir=/usr/sbin # 24|-> sysconfdir="/etc" # 25| PACKAGE_NAME=GRUB # 26| PACKAGE_VERSION=2.06 Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-set-default:20:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally). # 18| # 19| # Initialize some variables. # 20|-> prefix=/usr # 21| exec_prefix=/usr # 22| bindir=/usr/bin Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-set-default:21:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 19| # Initialize some variables. # 20| prefix=/usr # 21|-> exec_prefix=/usr # 22| bindir=/usr/bin # 23| sysconfdir="/etc" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-set-password:40:7: warning[SC3028]: In POSIX sh, EUID is undefined. # 38| # 39| # Ensure that it's the root user running this script # 40|-> if [ "${EUID}" -ne 0 ]; then # 41| echo "The grub bootloader password may only be set by root." # 42| usage Error: SHELLCHECK_WARNING: /usr/sbin/grub2-set-password:88:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 86| # 87| # prompt & confirm new grub2 root user password # 88|-> echo -n "Enter password: " # 89| read PASSWORD # 90| echo Error: SHELLCHECK_WARNING: /usr/sbin/grub2-set-password:91:6: warning[SC3037]: In POSIX sh, echo flags are undefined. # 89| read PASSWORD # 90| echo # 91|-> echo -n "Confirm password: " # 92| read PASSWORD_CONFIRM # 93| echo Error: SHELLCHECK_WARNING: /usr/sbin/grub2-set-password:97:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 95| # 96| getpass() { # 97|-> local P0 # 98| local P1 # 99| P0="$1" && shift Error: SHELLCHECK_WARNING: /usr/sbin/grub2-set-password:98:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 96| getpass() { # 97| local P0 # 98|-> local P1 # 99| P0="$1" && shift # 100| P1="$1" && shift Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-switch-to-blscfg:23:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally). # 21| # Initialize some variables. # 22| prefix=/usr # 23|-> exec_prefix=/usr # 24| sbindir=/usr/sbin # 25| bindir=/usr/bin Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-switch-to-blscfg:26:1: warning[SC2034]: sysconfdir appears unused. Verify use (or export if used externally). # 24| sbindir=/usr/sbin # 25| bindir=/usr/bin # 26|-> sysconfdir="/etc" # 27| PACKAGE_NAME=GRUB # 28| PACKAGE_VERSION=2.06 Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:31:8: warning[SC3016]: In POSIX sh, unary -v (in place of [ -n "${var+x}" ]) is undefined. # 29| datarootdir="/usr/share" # 30| datadir="/usr/share" # 31|-> if [ ! -v pkgdatadir ]; then # 32| pkgdatadir="${datadir}/grub" # 33| fi Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:155:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 153| # 154| find_grub_cfg() { # 155|-> local candidate="" # 156| while [ -e "${candidate}" -o $# -gt 0 ] # 157| do Error: SHELLCHECK_WARNING (CWE-477): /usr/sbin/grub2-switch-to-blscfg:156:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 154| find_grub_cfg() { # 155| local candidate="" # 156|-> while [ -e "${candidate}" -o $# -gt 0 ] # 157| do # 158| if [ ! -e "${candidate}" ] ; then Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:191:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 189| # 190| mkbls() { # 191|-> local kernelver=$1 && shift # 192| local datetime=$1 && shift # 193| local kernelopts=$1 && shift Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:192:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 190| mkbls() { # 191| local kernelver=$1 && shift # 192|-> local datetime=$1 && shift # 193| local kernelopts=$1 && shift # 194| Error: SHELLCHECK_WARNING (CWE-563): /usr/sbin/grub2-switch-to-blscfg:192:11: warning[SC2034]: datetime appears unused. Verify use (or export if used externally). # 190| mkbls() { # 191| local kernelver=$1 && shift # 192|-> local datetime=$1 && shift # 193| local kernelopts=$1 && shift # 194| Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:193:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 191| local kernelver=$1 && shift # 192| local datetime=$1 && shift # 193|-> local kernelopts=$1 && shift # 194| # 195| local debugname="" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:195:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 193| local kernelopts=$1 && shift # 194| # 195|-> local debugname="" # 196| local debugid="" # 197| local flavor="" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:196:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 194| # 195| local debugname="" # 196|-> local debugid="" # 197| local flavor="" # 198| Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:197:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 195| local debugname="" # 196| local debugid="" # 197|-> local flavor="" # 198| # 199| if [ "$kernelver" == *\+* ] ; then Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:199:23: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 197| local flavor="" # 198| # 199|-> if [ "$kernelver" == *\+* ] ; then # 200| local flavor=-"${kernelver##*+}" # 201| if [ "${flavor}" == "-debug" ]; then Error: SHELLCHECK_WARNING (CWE-398): /usr/sbin/grub2-switch-to-blscfg:199:26: error[SC2081]: [ .. ] can't match globs. Use a case statement. # 197| local flavor="" # 198| # 199|-> if [ "$kernelver" == *\+* ] ; then # 200| local flavor=-"${kernelver##*+}" # 201| if [ "${flavor}" == "-debug" ]; then Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:200:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 198| # 199| if [ "$kernelver" == *\+* ] ; then # 200|-> local flavor=-"${kernelver##*+}" # 201| if [ "${flavor}" == "-debug" ]; then # 202| local debugname=" with debugging" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:201:26: warning[SC3014]: In POSIX sh, == in place of = is undefined. # 199| if [ "$kernelver" == *\+* ] ; then # 200| local flavor=-"${kernelver##*+}" # 201|-> if [ "${flavor}" == "-debug" ]; then # 202| local debugname=" with debugging" # 203| local debugid="-debug" Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:202:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 200| local flavor=-"${kernelver##*+}" # 201| if [ "${flavor}" == "-debug" ]; then # 202|-> local debugname=" with debugging" # 203| local debugid="-debug" # 204| fi Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:203:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 201| if [ "${flavor}" == "-debug" ]; then # 202| local debugname=" with debugging" # 203|-> local debugid="-debug" # 204| fi # 205| fi Error: SHELLCHECK_WARNING: /usr/sbin/grub2-switch-to-blscfg:207:9: warning[SC3046]: In POSIX sh, 'source' in place of '.' is undefined. # 205| fi # 206| ( # 207|-> source /etc/os-release # 208| # 209| cat <<EOF Error: SHELLCHECK_WARNING (CWE-252): /usr/sbin/grub2-switch-to-blscfg:223:24: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 221| # 222| copy_bls() { # 223|-> for kernelver in $(cd /lib/modules/ ; ls -1) "" ; do # 224| bls_target="${blsdir}/${MACHINE_ID}-${kernelver}.conf" # 225| linux="/vmlinuz-${kernelver}" Error: SHELLCHECK_WARNING (CWE-457): /usr/sbin/grub2-switch-to-blscfg:236:20: warning[SC2154]: grub_mkrelpath is referenced but not assigned. # 234| fi # 235| # 236|-> linux_relpath="$("${grub_mkrelpath}" "${linux_path}")" # 237| bootprefix="${linux_relpath%%"${linux}"}" # 238| cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" Error: SHELLCHECK_WARNING (CWE-398): /usr/sbin/grub2-switch-to-blscfg:266:71: warning[SC2061]: Quote the parameter to -name so the shell won't interpret it. # 264| ! ${grub_editenv} - list | grep -q blsdir && \ # 265| mountpoint -q /boot; then # 266|-> grub_binary="$(find /usr/lib/ostree-boot/efi/EFI/${EFIDIR}/ -name grub*.efi)" # 267| install -m 700 ${grub_binary} ${grubdir} || exit 1 # 268| # Create a hidden file to indicate that grub2 now has BLS support. Error: SHELLCHECK_WARNING (CWE-477): /usr/sbin/grub2-switch-to-blscfg:295:28: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 293| if [ $arch = "x86_64" ] && [ ! -d /sys/firmware/efi ]; then # 294| mod_dir="i386-pc" # 295|-> elif [ $arch = "ppc64" -o $arch = "ppc64le" ] && [ ! -d /sys/firmware/opal ]; then # 296| mod_dir="powerpc-ieee1275" # 297| fi Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/ehci.c:1236:36: warning[core.NullDereference]: Access to field 'alt_next_td' results in a dereference of a null pointer (loaded from field 'td_last_virt') # 1234| cdata->td_last_phys = grub_dma_virt2phys (td, e->td_chunk); # 1235| /* Last TD should not have set alternate TD */ # 1236|-> cdata->td_last_virt->alt_next_td = grub_cpu_to_le32_compile_time (GRUB_EHCI_TERMINATE); # 1237| # 1238| grub_dprintf ("ehci", "setup_transfer: cdata=%p, qh=%p\n", Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_free_tds’ grub-2.06/grub-core/bus/usb/ohci.c:596:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev_virt’ grub-2.06/include/grub/dl.h:30: included_from: Included from here. grub-2.06/grub-core/bus/usb/ohci.c:20: included_from: Included from here. grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 594| td->prev_td_phys); # 595| # 596|-> if (td == (grub_ohci_td_t) td_prev_virt->link_td) # 597| td_prev_virt->link_td = 0; # 598| } Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/ohci.c:651:3: warning[deadcode.DeadStores]: Value stored to 'buffer_end' is never read # 649| # 650| buffer = data; # 651|-> buffer_end = buffer + size - 1; # 652| # 653| /* Set correct buffer values in TD if zero transfer occurs */ Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_transaction’ grub-2.06/grub-core/bus/usb/ohci.c:658:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td’ grub-2.06/include/grub/dl.h:26: included_from: Included from here. grub-2.06/include/grub/types.h:263:51: note: in definition of macro ‘grub_cpu_to_le32’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 656| buffer = (grub_uint32_t) data; # 657| buffer_end = buffer + size - 1; # 658|-> td->buffer = grub_cpu_to_le32 (buffer); # 659| td->buffer_end = grub_cpu_to_le32 (buffer_end); # 660| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c:663:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td’ grub-2.06/include/grub/types.h:263:51: note: in definition of macro ‘grub_cpu_to_le32’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 661| else # 662| { # 663|-> td->buffer = 0; # 664| td->buffer_end = 0; # 665| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c: scope_hint: In function ‘finish_transfer’ grub-2.06/grub-core/bus/usb/ohci.c:939:66: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev_virt’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 937| = grub_ohci_td_phys2virt (o, cdata->td_current_virt->prev_td_phys); # 938| # 939|-> if (cdata->td_current_virt == (grub_ohci_td_t) td_prev_virt->link_td) # 940| td_prev_virt->link_td = 0; # 941| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c: scope_hint: In function ‘parse_halt’ grub-2.06/grub-core/bus/usb/ohci.c:969:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 967| cdata->tderr_phys = grub_ohci_td_phys2virt (o, # 968| grub_le_to_cpu32 (cdata->ed_virt->td_head) & ~0xf ) # 969|-> ->prev_td_phys; # 970| # 971| /* Prepare pointer to last processed TD and get error code */ Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_cancel_transfer’ grub-2.06/grub-core/bus/usb/ohci.c:1209:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’ # 1207| cdata->tderr_phys # 1208| = grub_ohci_td_phys2virt (o, grub_le_to_cpu32 (cdata->ed_virt->td_head) # 1209|-> & ~0xf)->prev_td_phys; # 1210| # 1211| tderr_virt = grub_ohci_td_phys2virt (o,cdata-> tderr_phys); Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/uhci.c: scope_hint: In function ‘grub_uhci_setup_transfer’ grub-2.06/grub-core/bus/usb/uhci.c:570:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev’ grub-2.06/include/grub/dl.h:29: included_from: Included from here. grub-2.06/grub-core/bus/usb/uhci.c:20: included_from: Included from here. grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ grub-2.06/grub-core/bus/usb/uhci.c:482:3: note: in expansion of macro ‘grub_dprintf’ # 568| else # 569| { # 570|-> td_prev->linkptr2 = grub_dma_virt2phys (td, u->td_chunk); # 571| td_prev->linkptr = grub_dma_virt2phys (td, u->td_chunk); # 572| td_prev->linkptr |= 4; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/bus/usb/uhci.c:576:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev’ grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 574| td_prev = td; # 575| } # 576|-> td_prev->linkptr2 = 0; # 577| td_prev->linkptr = 1; # 578| Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/uhci.c:576:21: warning[core.NullDereference]: Access to field 'linkptr2' results in a dereference of a null pointer (loaded from variable 'td_prev') # 574| td_prev = td; # 575| } # 576|-> td_prev->linkptr2 = 0; # 577| td_prev->linkptr = 1; # 578| Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/uhci.c:776:14: warning[deadcode.DeadStores]: Although the value stored to 'status' is used in the enclosing expression, the value is never actually read from 'status' # 774| # 775| endtime = grub_get_time_ms () + 1000; # 776|-> while (! ((status = grub_uhci_readreg16 (u, reg)) & (1 << 2))) # 777| if (grub_get_time_ms () > endtime) # 778| return GRUB_USB_ERR_TIMEOUT; Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/usb.c:159:7: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 157| descriptor, after that it is known how many bytes really have # 158| to be read. */ # 159|-> err = grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_CONFIG, i, 4, # 160| (char *) &config); # 161| Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/usbtrans.c:306:7: warning[deadcode.DeadStores]: Value stored to 'toggle' during its initialization is never read # 304| { # 305| grub_usb_device_t dev = transfer->dev; # 306|-> int toggle = dev->toggle[transfer->endpoint]; # 307| # 308| /* We must remember proper toggle value even if some transactions Error: CLANG_WARNING: grub-2.06/grub-core/bus/usb/usbtrans.c:381:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 379| err = grub_usb_bulk_readwrite (dev, endpoint, current_size, # 380| &data[position], type, 1000, &actual); # 381|-> transferred += actual; # 382| if (err || (current_size != actual)) break; # 383| } Error: CLANG_WARNING: grub-2.06/grub-core/commands/acpi.c:241:6: warning[deadcode.DeadStores]: Value stored to 'target' is never read # 239| v1inebda = target; # 240| target += sizeof (struct grub_acpi_rsdp_v10); # 241|-> target = (grub_uint8_t *) ALIGN_UP((grub_addr_t) target, 16); # 242| v1 = 0; # 243| break; Error: CLANG_WARNING: grub-2.06/grub-core/commands/acpi.c:277:6: warning[deadcode.DeadStores]: Value stored to 'target' is never read # 275| v1inebda = target; # 276| target += sizeof (struct grub_acpi_rsdp_v10); # 277|-> target = (grub_uint8_t *) ALIGN_UP((grub_addr_t) target, 16); # 278| v1 = 0; # 279| break; Error: CLANG_WARNING: grub-2.06/grub-core/commands/appendedsig/appendedsig.c:248:22: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value # 246| return err; # 247| # 248|-> datasize = bufsize - sig.signature_len; # 249| # 250| context = grub_zalloc (sig.pkcs7.hash->contextsize); Error: COMPILER_WARNING: grub-2.06/include/grub/misc.h:26: included_from: Included from here. grub-2.06/grub-core/commands/appendedsig/appendedsig.c:20: included_from: Included from here. grub-2.06/grub-core/commands/appendedsig/appendedsig.c: scope_hint: In function ‘grub_cmd_distrust’ grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:25: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:22: note: in expansion of macro ‘N_’ # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ^~ grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:49: note: format string is defined here # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ~^ # | | # | int # | %ld # 403| # 404| return grub_error (GRUB_ERR_BAD_ARGUMENT, # 405|-> N_("No certificate number %d found - only %d certificates in the store"), # 406| cert_num, i - 1); # 407| } Error: COMPILER_WARNING: grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:25: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:22: note: in expansion of macro ‘N_’ # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ^~ grub-2.06/grub-core/commands/appendedsig/appendedsig.c:405:65: note: format string is defined here # 405 | N_("No certificate number %d found - only %d certificates in the store"), # | ~^ # | | # | int # | %ld # 403| # 404| return grub_error (GRUB_ERR_BAD_ARGUMENT, # 405|-> N_("No certificate number %d found - only %d certificates in the store"), # 406| cert_num, i - 1); # 407| } Error: CLANG_WARNING: grub-2.06/grub-core/commands/blocklist.c:86:7: warning[deadcode.DeadStores]: Value stored to 'offset' is never read # 84| length -= l; # 85| sector++; # 86|-> offset = 0; # 87| } # 88| Error: CLANG_WARNING: grub-2.06/grub-core/commands/blscfg.c:174:10: warning[core.NullDereference]: Access to field 'val' results in a dereference of a null pointer (loaded from variable 'kv') # 172| *last = idx; # 173| # 174|-> return kv->val; # 175| } # 176| Error: CLANG_WARNING: grub-2.06/grub-core/commands/blscfg.c:682:7: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read # 680| # 681| if (is_var) # 682|-> tmp = grub_stpcpy (tmp, " "); # 683| # 684| return buffer; Error: CLANG_WARNING: grub-2.06/grub-core/commands/blscfg.c:900:7: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read # 898| tmp = grub_stpcpy (tmp, initrds[i]); # 899| } # 900|-> tmp = grub_stpcpy (tmp, "\n"); # 901| } # 902| Error: CLANG_WARNING: grub-2.06/grub-core/commands/blscfg.c:932:13: warning[deadcode.DeadStores]: Value stored to 'tmp' during its initialization is never read # 930| goto finish; # 931| } # 932|-> char *tmp = dt; # 933| tmp = grub_stpcpy (dt, "devicetree"); # 934| tmp = frob_boot_device (tmp); Error: CLANG_WARNING: grub-2.06/grub-core/commands/blscfg.c:938:7: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read # 936| tmp = grub_stpcpy (tmp, prefix); # 937| tmp = grub_stpcpy (tmp, devicetree); # 938|-> tmp = grub_stpcpy (tmp, "\n"); # 939| # 940| grub_free(prefix); Error: COMPILER_WARNING (CWE-563): grub-2.06/grub-core/commands/efi/connectefi.c: scope_hint: In function ‘grub_cmd_connectefi’ grub-2.06/grub-core/commands/efi/connectefi.c:143:20: warning[-Wunused-variable]: unused variable ‘j’ # 143 | unsigned j; # | ^ # 141| grub_efi_handle_t handle = handles[i]; # 142| grub_efi_status_t status; # 143|-> unsigned j; # 144| # 145| /* Skip already handled handles */ Error: COMPILER_WARNING: grub-2.06/include/grub/dl.h:29: included_from: Included from here. grub-2.06/grub-core/commands/efi/env.c:18: included_from: Included from here. grub-2.06/grub-core/commands/efi/env.c: scope_hint: In function ‘grub_efi_export_env’ grub-2.06/grub-core/commands/efi/env.c:111:27: warning[-Wformat=]: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: grub-2.06/grub-core/commands/efi/env.c:116:29: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 5 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: grub-2.06/grub-core/commands/efi/env.c:122:29: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 5 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: CLANG_WARNING: grub-2.06/grub-core/commands/i386/pc/sendkey.c:269:4: warning[deadcode.DeadStores]: Value stored to 'value' is never read # 267| for (failed = 0; failed < 5; failed++) # 268| { # 269|-> value = 0; # 270| /* Send command change LEDs */ # 271| grub_outb (0xed, 0x60); Error: CLANG_WARNING: grub-2.06/grub-core/commands/legacycfg.c:148:18: warning[core.NullDereference]: Array access (from variable 'entrysrc') results in a null pointer dereference # 146| entrysrc, 0, NULL, NULL); # 147| grub_free (args); # 148|-> entrysrc[0] = 0; # 149| grub_free (oldname); # 150| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/commands/legacycfg.c: scope_hint: In function ‘legacy_file’ grub-2.06/grub-core/commands/legacycfg.c:148:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entrysrc’ # 146| entrysrc, 0, NULL, NULL); # 147| grub_free (args); # 148|-> entrysrc[0] = 0; # 149| grub_free (oldname); # 150| } Error: CLANG_WARNING: grub-2.06/grub-core/commands/ls.c:199:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'path') # 197| } # 198| # 199|-> if (! *path && device_name) # 200| { # 201| if (grub_errno == GRUB_ERR_UNKNOWN_FS) Error: CLANG_WARNING: grub-2.06/grub-core/commands/ls.c:249:4: warning[deadcode.DeadStores]: Value stored to 'all' is never read # 247| goto fail; # 248| # 249|-> all = 1; # 250| grub_memset (&info, 0, sizeof (info)); # 251| if (longlist) Error: CLANG_WARNING: grub-2.06/grub-core/commands/pgp.c:244:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 242| if (err) # 243| goto fail; # 244|-> if (type == 0xfe) # 245| continue; # 246| if (type == 0xff) Error: CLANG_WARNING: grub-2.06/grub-core/commands/pgp.c:253:7: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value # 251| } # 252| # 253|-> grub_dprintf ("crypt", "len = %x\n", (int) len); # 254| # 255| pend = grub_file_tell (f) + len; Error: CLANG_WARNING: grub-2.06/grub-core/commands/usbtest.c:89:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 87| if (! descstrp) # 88| return GRUB_USB_ERR_INTERNAL; # 89|-> err = grub_usb_control_msg (dev, 1 << 7, # 90| 0x06, (3 << 8) | index, # 91| langid, descstr.length, (char *) descstrp); Error: CLANG_WARNING: grub-2.06/grub-core/commands/videotest.c:142:5: warning[deadcode.DeadStores]: Value stored to 'texty' is never read # 140| texty += grub_font_get_ascent(sanssmall); # 141| grub_font_draw_string (str, sanssmall, color, 16, texty); # 142|-> texty += (grub_font_get_descent (sanssmall) # 143| + grub_font_get_leading (sanssmall)); # 144| Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/disk/luks2.c: scope_hint: In function ‘luks2_get_keyslot’ grub-2.06/grub-core/disk/luks2.c:307:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*d.segments’ grub-2.06/include/grub/disk.h:26: included_from: Included from here. grub-2.06/include/grub/cryptodisk.h:22: included_from: Included from here. grub-2.06/grub-core/disk/luks2.c:19: included_from: Included from here. grub-2.06/grub-core/disk/luks2.c:563:30: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/grub-core/disk/luks2.c:569:25: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/grub-core/disk/luks2.c:573:38: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/include/grub/disk.h:31: included_from: Included from here. # 305| return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse segment index %" PRIuGRUB_SIZE, json_idx); # 306| # 307|-> if ((d->segments & (1 << s->idx))) # 308| break; # 309| } Error: CLANG_WARNING: grub-2.06/grub-core/disk/luks2.c:634:33: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 632| # 633| /* Sector size should be one of 512, 1024, 2048, or 4096. */ # 634|-> if (!(segment.sector_size == 512 || segment.sector_size == 1024 || # 635| segment.sector_size == 2048 || segment.sector_size == 4096)) # 636| { Error: CLANG_WARNING: grub-2.06/grub-core/disk/usbms.c:143:28: warning[deadcode.DeadStores]: Value stored to 'interf' during its initialization is never read # 141| grub_usbms_attach (grub_usb_device_t usbdev, int configno, int interfno) # 142| { # 143|-> struct grub_usb_desc_if *interf # 144| = usbdev->config[configno].interf[interfno].descif; # 145| int j; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/efiemu/runtime/efiemu.c: scope_hint: In function ‘efiemu_set_variable_real’ grub-2.06/grub-core/efiemu/runtime/efiemu.c:547:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘efivar’ grub-2.06/include/grub/types.h:22: included_from: Included from here. grub-2.06/grub-core/efiemu/runtime/efiemu.c:31: included_from: Included from here. grub-2.06/grub-core/efiemu/runtime/config.h:33:22: note: in definition of macro ‘EFI_FUNC’ grub-2.06/grub-core/efiemu/runtime/efiemu.c: scope_hint: In function ‘efiemu_set_variable_real’ # 545| # 546| efiemu_memcpy (&(efivar->guid), vendor_guid, sizeof (efivar->guid)); # 547|-> efivar->namelen = 2 * (efiemu_str16len (variable_name) + 1); # 548| efivar->size = data_size; # 549| efivar->attributes = attributes; Error: CLANG_WARNING: grub-2.06/grub-core/efiemu/runtime/efiemu.c:547:19: warning[core.NullDereference]: Access to field 'namelen' results in a dereference of a null pointer (loaded from variable 'efivar') # 545| # 546| efiemu_memcpy (&(efivar->guid), vendor_guid, sizeof (efivar->guid)); # 547|-> efivar->namelen = 2 * (efiemu_str16len (variable_name) + 1); # 548| efivar->size = data_size; # 549| efivar->attributes = attributes; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/font/font.c: scope_hint: In function ‘grub_font_construct_dry_run’ grub-2.06/grub-core/font/font.c:1491:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘comb’ grub-2.06/include/grub/font.h:25: included_from: Included from here. grub-2.06/grub-core/font/font.c:23: included_from: Included from here. /usr/include/locale.h:28: included_from: Included from here. grub-2.06/include/grub/i18n.h:32: included_from: Included from here. grub-2.06/include/grub/misc.h:27: included_from: Included from here. grub-2.06/include/grub/dl.h:29: included_from: Included from here. grub-2.06/include/grub/partition.h:22: included_from: Included from here. grub-2.06/include/grub/fs.h:30: included_from: Included from here. grub-2.06/include/grub/file.h:25: included_from: Included from here. grub-2.06/include/grub/bufio.h:23: included_from: Included from here. grub-2.06/grub-core/font/font.c:20: included_from: Included from here. # 1489| combining_glyphs[i] # 1490| = grub_font_get_glyph_with_fallback (main_glyph->font, # 1491|-> comb[i].code); # 1492| # 1493| blit_comb (glyph_id, NULL, bounds, main_glyph, combining_glyphs, Error: CLANG_WARNING: grub-2.06/grub-core/font/font.c:1564:7: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 1562| return main_glyph; # 1563| # 1564|-> if (grub_video_bitmap_calc_1bpp_bufsz (bounds.width, bounds.height, &cur_glyph_size) || # 1565| grub_add (sizeof (*glyph), cur_glyph_size, &cur_glyph_size)) # 1566| return main_glyph; Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:204:5: warning[core.BitwiseShift]: Left shift overflows the capacity of 'grub_off_t' # 202| << grub_bfs_to_cpu32 (sb->log2_ag_size)) # 203| + grub_bfs_to_cpu16 (in->start) + off) # 204|-> << (grub_bfs_to_cpu32 (sb->log2_bsize) # 205| - GRUB_DISK_SECTOR_BITS)), # 206| byteoff, len, buf); Error: CLANG_WARNING: grub-2.06/grub-core/fs/afs.c:2: included_from: Included from here. grub-2.06/grub-core/fs/bfs.c:279:7: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 277| if (!entries) # 278| return grub_errno; # 279|-> err = read_extent (disk, sb, &ino->indirect, 0, 0, # 280| entries, nentries << LOG_EXTENT_SIZE); # 281| for (i = 0; i < nentries; i++) Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:447:45: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 445| return err; # 446| # 447|-> total_size = ALIGN_UP (sizeof (node_head) + # 448| grub_bfs_to_cpu_treehead # 449| (node_head.total_key_len), Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:540:23: warning[core.NullDereference]: Access to field 'count_keys' results in a dereference of a null pointer (loaded from variable 'node') # 538| return 0; # 539| # 540|-> for (i = 0; i < grub_bfs_to_cpu_treehead (node->count_keys); i++) # 541| { # 542| char c; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/include/grub/file.h:22: included_from: Included from here. grub-2.06/grub-core/fs/bfs.c:25: included_from: Included from here. grub-2.06/grub-core/fs/afs.c:2: included_from: Included from here. grub-2.06/grub-core/fs/bfs.c: scope_hint: In function ‘iterate_in_b_tree’ grub-2.06/grub-core/fs/bfs.c:540:53: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:540:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:540:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:540:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’ # 538| return 0; # 539| # 540|-> for (i = 0; i < grub_bfs_to_cpu_treehead (node->count_keys); i++) # 541| { # 542| char c; Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:602:12: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 600| if (err) # 601| return err; # 602|-> node_off = grub_bfs_to_cpu64 (head.root); # 603| # 604| level = grub_bfs_to_cpu32 (head.level) - 1; Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:618:11: warning[core.NullDereference]: Access to field 'count_keys' results in a dereference of a null pointer (loaded from variable 'node') # 616| return err; # 617| # 618|-> if (node->count_keys == 0) # 619| { # 620| grub_free (node); Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/fs/bfs.c: scope_hint: In function ‘find_in_b_tree’ grub-2.06/grub-core/fs/bfs.c:618:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’ grub-2.06/include/grub/file.h:22: included_from: Included from here. grub-2.06/grub-core/fs/bfs.c:25: included_from: Included from here. grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:1057:22: note: in expansion of macro ‘grub_bfs_to_cpu32’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:1062:27: note: in expansion of macro ‘grub_bfs_to_cpu32’ grub-2.06/include/grub/types.h:266:51: note: in definition of macro ‘grub_le_to_cpu32’ grub-2.06/grub-core/fs/bfs.c:1020:26: note: in expansion of macro ‘grub_bfs_to_cpu32’ # 616| return err; # 617| # 618|-> if (node->count_keys == 0) # 619| { # 620| grub_free (node); Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:1028:9: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<<' is a garbage value # 1026| return -1; # 1027| grub_disk_read (disk, res # 1028|-> << (grub_bfs_to_cpu32 (sb->log2_bsize) # 1029| - GRUB_DISK_SECTOR_BITS), 0, # 1030| grub_bfs_to_cpu32 (sb->bsize), (char *) ino); Error: CLANG_WARNING: grub-2.06/grub-core/fs/bfs.c:1071:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1069| &vid, sizeof (vid)) == sizeof (vid)) # 1070| *uuid = # 1071|-> grub_xasprintf ("%016" PRIxGRUB_UINT64_T, grub_bfs_to_cpu64 (vid)); # 1072| # 1073| grub_free (ino); Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:334:3: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 332| free_iterator (struct grub_btrfs_leaf_descriptor *desc) # 333| { # 334|-> grub_free (desc->data); # 335| } # 336| Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:341:41: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 339| grub_disk_addr_t addr) # 340| { # 341|-> if (grub_le_to_cpu64 (header->bytenr) != addr) # 342| { # 343| grub_dprintf ("btrfs", "btrfs_header.bytenr is not equal node addr\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:413:13: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 411| return -err; # 412| # 413|-> err = grub_btrfs_read_logical (data, grub_le_to_cpu64 (node.addr), # 414| &head, sizeof (head), 0); # 415| if (err) Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:429:12: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 427| if (err) # 428| return -err; # 429|-> *outsize = grub_le_to_cpu32 (leaf.size); # 430| *outaddr = desc->data[desc->depth - 1].addr + sizeof (struct btrfs_header) # 431| + grub_le_to_cpu32 (leaf.offset); Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:1297:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1295| err = get_fs_root(data, data->sblock.root_tree, id, -1, &tree); # 1296| if (!err) # 1297|-> data->fs_tree = tree; # 1298| return err; # 1299| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:1335:21: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 1333| return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", path); # 1334| # 1335|-> if (key.object_id != grub_cpu_to_le64_compile_time (GRUB_BTRFS_OBJECT_ID_CHUNK) || tree == 0) # 1336| return grub_error(GRUB_ERR_BAD_FILE_TYPE, "%s: not a subvolume\n", path); # 1337| Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:1354:21: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 1352| return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", path); # 1353| # 1354|-> if (key.object_id != grub_cpu_to_le64_compile_time (GRUB_BTRFS_OBJECT_ID_CHUNK) || tree == 0) # 1355| return grub_error(GRUB_ERR_BAD_FILE_TYPE, "%s: not a subvolume\n", path); # 1356| Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:1372:4: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1370| if (err == GRUB_ERR_FILE_NOT_FOUND) # 1371| { # 1372|-> err = GRUB_ERR_NONE; # 1373| return lookup_root_by_name_fallback(data, btrfs_default_subvol); # 1374| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2445:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2443| else # 2444| { # 2445|-> info.mtime = grub_le_to_cpu64 (inode.mtime.sec); # 2446| info.mtimeset = 1; # 2447| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2511:14: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2509| # 2510| file->data = data; # 2511|-> file->size = grub_le_to_cpu64 (inode.size); # 2512| # 2513| return err; Error: COMPILER_WARNING (CWE-697): grub-2.06/grub-core/fs/btrfs.c: scope_hint: In function ‘grub_cmd_btrfs_info’ grub-2.06/grub-core/fs/btrfs.c:2708:7: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘label’ will never be NULL # 2708 | if (data->sblock.label) # | ^~~~ grub-2.06/grub-core/fs/btrfs.c:92:8: note: ‘label’ declared here # 92 | char label[0x100]; # | ^~~~~ # 2706| } # 2707| # 2708|-> if (data->sblock.label) # 2709| grub_printf("Label: '%s' ", data->sblock.label); # 2710| else Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2900:12: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2898| return err; # 2899| # 2900|-> *fs_root = ri.tree; # 2901| # 2902| return GRUB_ERR_NONE; Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2978:7: warning[deadcode.DeadStores]: Value stored to 'r' is never read # 2976| if (key_out.type != GRUB_BTRFS_ITEM_TYPE_ROOT_REF || elemaddr == 0) # 2977| { # 2978|-> r = next(data, &desc, &elemaddr, &elemsize, &key_out); # 2979| } # 2980| Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2982:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 2980| # 2981| if (key_out.type != GRUB_BTRFS_ITEM_TYPE_ROOT_REF) { # 2982|-> err = GRUB_ERR_FILE_NOT_FOUND; # 2983| grub_error(GRUB_ERR_FILE_NOT_FOUND, N_("can't find root refs")); # 2984| goto out; Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:2994:11: warning[deadcode.DeadStores]: Value stored to 'r' is never read # 2992| if (key_out.type != GRUB_BTRFS_ITEM_TYPE_ROOT_REF) # 2993| { # 2994|-> r = 0; # 2995| break; # 2996| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:3005:15: warning[deadcode.DeadStores]: Value stored to 'r' is never read # 3003| if (!buf) # 3004| { # 3005|-> r = -grub_errno; # 3006| break; # 3007| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:3014:11: warning[deadcode.DeadStores]: Value stored to 'r' is never read # 3012| if (err) # 3013| { # 3014|-> r = -err; # 3015| break; # 3016| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:3017:23: warning[core.NullDereference]: Array access (from variable 'buf') results in a null pointer dereference # 3015| break; # 3016| } # 3017|-> buf[elemsize] = 0; # 3018| # 3019| find_pathname(data, ref->dirid, fs_root, ref->name, &p); Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:3128:19: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 3126| if (child_path) # 3127| { # 3128|-> *path_out = grub_xasprintf ("%s/%s", parent_path, child_path); # 3129| grub_free (parent_path); # 3130| } Error: CLANG_WARNING: grub-2.06/grub-core/fs/btrfs.c:3132:15: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 3130| } # 3131| else # 3132|-> *path_out = parent_path; # 3133| # 3134| *parent_id = grub_le_to_cpu64 (key_out.offset); Error: CLANG_WARNING: grub-2.06/grub-core/fs/fat.c:841:4: warning[deadcode.DeadStores]: Value stored to 'checksum' is never read # 839| } # 840| # 841|-> checksum = -1; # 842| } # 843| Error: CLANG_WARNING: grub-2.06/grub-core/fs/exfat.c:2: included_from: Included from here. grub-2.06/grub-core/fs/fat.c:1036:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1034| grub_fat_iterate_fini (&ctxt); # 1035| if (err == GRUB_ERR_EOF) # 1036|-> err = 0; # 1037| # 1038| fail: Error: CLANG_WARNING: grub-2.06/grub-core/fs/fat.c:1212:12: warning[deadcode.DeadStores]: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' # 1210| goto fail; # 1211| # 1212|-> while (!(err = grub_fat_iterate_dir_next (&root, &ctxt))) # 1213| if ((ctxt.dir.attr & ~GRUB_FAT_ATTR_ARCHIVE) == GRUB_FAT_ATTR_VOLUME_ID) # 1214| { Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/fs/fshelp.c: scope_hint: In function ‘directory_find_file’ grub-2.06/grub-core/fs/fshelp.c:152:11: warning[-Wanalyzer-jump-through-null]: jump through null pointer # 150| .name = name # 151| }; # 152|-> found = iterate_dir (node, find_file_iter, &ctx); # 153| if (! found) # 154| { Error: CLANG_WARNING: grub-2.06/grub-core/fs/fshelp.c:152:11: warning[core.CallAndMessage]: Called function pointer is null (null dereference) # 150| .name = name # 151| }; # 152|-> found = iterate_dir (node, find_file_iter, &ctx); # 153| if (! found) # 154| { Error: CLANG_WARNING: grub-2.06/grub-core/fs/fshelp.c:188:11: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from field 'currnode') # 186| /* At this point it is expected that the current node is a # 187| directory, check if this is true. */ # 188|-> if (ctx->currnode->type != GRUB_FSHELP_DIR) # 189| return grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory")); # 190| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/fs/fshelp.c: scope_hint: In function ‘find_file’ grub-2.06/grub-core/fs/fshelp.c:188:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ctx.currnode’ # 186| /* At this point it is expected that the current node is a # 187| directory, check if this is true. */ # 188|-> if (ctx->currnode->type != GRUB_FSHELP_DIR) # 189| return grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory")); # 190| Error: CLANG_WARNING: grub-2.06/grub-core/fs/fshelp.c:299:16: warning[core.NullDereference]: Access to field 'node' results in a dereference of a null pointer (loaded from field 'currnode') # 297| } # 298| # 299|-> *foundnode = ctx.currnode->node; # 300| foundtype = ctx.currnode->type; # 301| /* Avoid the node being freed. */ Error: CLANG_WARNING: grub-2.06/grub-core/fs/iso9660.c:417:7: warning[deadcode.DeadStores]: Value stored to 'entry' is never read # 415| to get to the SUA (System Usage Area). */ # 416| data->susp_skip = entry->data[2]; # 417|-> entry = (struct grub_iso9660_susp_entry *) ((char *) entry + entry->len); # 418| # 419| /* Iterate over the entries in the SUA area to detect Error: CLANG_WARNING: grub-2.06/grub-core/fs/jfs.c:563:3: warning[deadcode.DeadStores]: Value stored to 'next_leaf' is never read # 561| # 562| leaf = &diro->leaf[diro->sorted[diro->index]]; # 563|-> next_leaf = &diro->next_leaf[diro->index]; # 564| # 565| len = leaf->len; Error: CLANG_WARNING: grub-2.06/grub-core/fs/jfs.c:805:5: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value # 803| # 804| info.dir = (grub_le_to_cpu32 (inode.mode) # 805|-> & GRUB_JFS_FILETYPE_MASK) == GRUB_JFS_FILETYPE_DIR; # 806| info.mtimeset = 1; # 807| info.mtime = grub_le_to_cpu32 (inode.mtime.sec); Error: CLANG_WARNING: grub-2.06/grub-core/fs/minix.c:446:33: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 444| pathname. */ # 445| if (grub_strncmp (name, filename, next - name) == 0 # 446|-> && filename[next - name] == '\0') # 447| { # 448| dirino = data->ino; Error: CLANG_WARNING: grub-2.06/grub-core/fs/minix.c:449:8: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 447| { # 448| dirino = data->ino; # 449|-> grub_minix_read_inode (data, grub_minix_to_cpu_ino (ino)); # 450| # 451| /* Follow the symlink. */ Error: CLANG_WARNING: grub-2.06/grub-core/fs/ntfs.c:779:7: warning[deadcode.DeadStores]: Value stored to 'end' is never read # 777| { # 778| grub_memmove (buf, buf + 6, end - buf + 1 - 6); # 779|-> end -= 6; # 780| } # 781| return buf; Error: CLANG_WARNING: grub-2.06/grub-core/fs/reiserfs.c:979:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 977| &directory_item, 1) != GRUB_ERR_NONE) # 978| goto fail; # 979|-> block_number = directory_item.block_number; # 980| block_position = directory_item.block_position; # 981| next_offset = directory_item.next_offset; Error: CLANG_WARNING: grub-2.06/grub-core/fs/reiserfs.c:1068:3: warning[deadcode.DeadStores]: Value stored to 'current_position' is never read # 1066| grub_reiserfs_set_key_type (&key, GRUB_REISERFS_ANY, 2); # 1067| initial_position = off; # 1068|-> current_position = 0; # 1069| final_position = grub_min (len + initial_position, node->size); # 1070| grub_dprintf ("reiserfs", Error: CLANG_WARNING: grub-2.06/grub-core/fs/reiserfs.c:1310:25: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 1308| if (grub_reiserfs_get_item (data, &root_key, &root, 1) != GRUB_ERR_NONE) # 1309| goto fail; # 1310|-> if (root.block_number == 0) # 1311| { # 1312| grub_error(GRUB_ERR_BAD_FS, "root not found"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/sfs.c:310:24: warning[deadcode.DeadStores]: Value stored to 'e' during its initialization is never read # 308| if (node->cache && node->cache_size >= node->cache_allocated) # 309| { # 310|-> struct cache_entry *e = node->cache; # 311| grub_size_t sz; # 312| Error: CLANG_WARNING: grub-2.06/grub-core/fs/squash4.c:954:5: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 952| if (err) # 953| return -1; # 954|-> a = grub_le_to_cpu64 (frag.offset); # 955| compressed = !(frag.size & grub_cpu_to_le32_compile_time (SQUASH_BLOCK_UNCOMPRESSED)); # 956| if (ino->ino.type == grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_REGULAR)) Error: CLANG_WARNING: grub-2.06/grub-core/fs/ufs.c:556:12: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 554| namelen = dirent.namelen_bsd; # 555| #else # 556|-> namelen = grub_ufs_to_cpu16 (dirent.namelen); # 557| #endif # 558| if (namelen < next - name) Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:1523:2: warning[deadcode.DeadStores]: Value stored to 'high' is never read # 1521| s = orig_s; # 1522| # 1523|-> high = grub_divmod64 ((offset >> desc->ashift), # 1524| desc->n_children, &m); # 1525| if (desc->nparity == 2) Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2032:13: warning[core.NullDereference]: Array access (from variable 'bp_array') results in a null pointer dereference # 2030| grub_dprintf ("zfs", "endian = %d\n", endian); # 2031| idx = (blkid >> (epbs * level)) & ((1 << epbs) - 1); # 2032|-> *bp = bp_array[idx]; # 2033| if (bp_array != dn->dn.dn_blkptr) # 2034| { Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2353:63: warning[core.BitwiseShift]: Right operand is negative in left shift # 2351| "external pointer tables not supported"); # 2352| idx = ZAP_HASH_IDX (hash, zap->zap_ptrtbl.zt_shift); # 2353|-> blkid = grub_zfs_to_cpu64 (((grub_uint64_t *) zap)[idx + (1 << (blksft - 3 - 1))], zap_dnode->endian); # 2354| # 2355| /* Get the leaf block */ Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2511:16: warning[core.NullDereference]: Dereference of undefined pointer value # 2509| if (err) # 2510| return err; # 2511|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2512| # 2513| grub_dprintf ("zfs", "zap read\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2511:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 2509| if (err) # 2510| return err; # 2511|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2512| # 2513| grub_dprintf ("zfs", "zap read\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2580:16: warning[core.NullDereference]: Dereference of undefined pointer value # 2578| if (err) # 2579| return 0; # 2580|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2581| # 2582| grub_dprintf ("zfs", "zap iterate\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2580:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 2578| if (err) # 2579| return 0; # 2580|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2581| # 2582| grub_dprintf ("zfs", "zap iterate\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2628:16: warning[core.NullDereference]: Dereference of undefined pointer value # 2626| if (err) # 2627| return 0; # 2628|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2629| # 2630| grub_dprintf ("zfs", "zap iterate\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2628:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 2626| if (err) # 2627| return 0; # 2628|-> block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian); # 2629| # 2630| grub_dprintf ("zfs", "zap iterate\n"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2710:23: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 2708| { # 2709| grub_memcpy (data->dnode_mdn, mdn, sizeof (*mdn)); # 2710|-> data->dnode_buf = dnbuf; # 2711| data->dnode_start = blkid << epbs; # 2712| data->dnode_end = (blkid + 1) << epbs; Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:2716:52: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 2714| } # 2715| # 2716|-> grub_memmove (&(buf->dn), (dnode_phys_t *) dnbuf + idx, DNODE_SIZE); # 2717| buf->endian = endian; # 2718| if (type && buf->dn.dn_type != type) Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:3112:9: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 3110| grub_dprintf ("zfs", "alive\n"); # 3111| # 3112|-> err = dnode_get (mosmdn, objnum, 0, mdn, data); # 3113| if (err) # 3114| return err; Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:3414:7: warning[core.NullDereference]: Array access (from variable 'nvlist') results in a null pointer dereference # 3412| /* NOTE: independently of what endianness header announces all # 3413| subsequent values are big-endian. */ # 3414|-> if (nvlist[0] != NV_ENCODE_XDR || (nvlist[1] != NV_LITTLE_ENDIAN # 3415| && nvlist[1] != NV_BIG_ENDIAN)) # 3416| { Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:3689:15: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value # 3687| } # 3688| # 3689|-> if (ospsize < OBJSET_PHYS_SIZE_V14) # 3690| { # 3691| grub_error (GRUB_ERR_BAD_FS, "OSP too small"); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:4028:9: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 4026| } # 4027| # 4028|-> err = dnode_get (&mdn, objnum, 0, &dn, data); # 4029| if (err) # 4030| { Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:4115:17: warning[core.NullDereference]: Access to field 'sa_layout_info' results in a dereference of a null pointer (loaded from variable 'sahdrp') # 4113| } # 4114| # 4115|-> hdrsize = SA_HDR_SIZE (((sa_hdr_phys_t *) sahdrp)); # 4116| info.mtimeset = 1; # 4117| info.mtime = grub_zfs_to_cpu64 (grub_get_unaligned64 ((char *) sahdrp + hdrsize + SA_MTIME_OFFSET), dn.endian); Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfs.c:4332:12: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 4330| return errnum; # 4331| # 4332|-> errnum = dnode_get(&mosmdn, objnum, DMU_OTN_ZAP_METADATA, &dn, data); # 4333| if (errnum != 0) # 4334| return errnum; Error: CLANG_WARNING: grub-2.06/grub-core/gdb/cstub.c:66:7: warning[deadcode.DeadStores]: Value stored to 'xmitcsum' is never read # 64| retry: # 65| checksum = 0; # 66|-> xmitcsum = -1; # 67| count = 0; # 68| Error: CLANG_WARNING: grub-2.06/grub-core/gettext/gettext.c:306:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 304| } # 305| # 306|-> if (head.magic != grub_cpu_to_le32_compile_time (MO_MAGIC_NUMBER)) # 307| { # 308| grub_file_close (fd); Error: CLANG_WARNING: grub-2.06/grub-core/gfxmenu/widget-box.c:336:11: warning[deadcode.DeadStores]: Value stored to 'path_end' is never read # 334| path_end = grub_stpcpy (path, pixmaps_prefix); # 335| path_end = grub_stpcpy (path_end, box_pixmap_names[i]); # 336|-> path_end = grub_stpcpy (path_end, pixmaps_suffix); # 337| # 338| grub_video_bitmap_load (&box->raw_pixmaps[i], path); Error: CLANG_WARNING: grub-2.06/grub-core/kern/dl.c:550:21: warning[core.NullDereference]: Access to field 'sh_offset' results in a dereference of a null pointer (loaded from variable 's') # 548| return grub_error (GRUB_ERR_BAD_MODULE, # 549| "incompatible license in module %s: %s", mod->name, # 550|-> (char *) e + s->sh_offset); # 551| } # 552| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/include/grub/dl.h:25: included_from: Included from here. grub-2.06/grub-core/kern/dl.c:25: included_from: Included from here. grub-2.06/grub-core/kern/dl.c: scope_hint: In function ‘grub_dl_check_license’ grub-2.06/grub-core/kern/dl.c:550:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s’ grub-2.06/include/grub/err.h:91:75: note: in definition of macro ‘grub_error’ grub-2.06/include/grub/dl.h:29: included_from: Included from here. grub-2.06/include/grub/misc.h:507:34: note: in expansion of macro ‘grub_dprintf’ grub-2.06/grub-core/kern/dl.c:911:3: note: in expansion of macro ‘grub_boot_time’ grub-2.06/include/grub/dl.h:30: included_from: Included from here. grub-2.06/grub-core/kern/dl.c:529:10: note: in expansion of macro ‘NULL’ grub-2.06/grub-core/kern/dl.c:560:12: note: in expansion of macro ‘grub_error’ grub-2.06/grub-core/kern/dl.c:529:10: note: in expansion of macro ‘NULL’ grub-2.06/include/grub/err.h:91:75: note: in definition of macro ‘grub_error’ grub-2.06/include/grub/err.h:91:75: note: in definition of macro ‘grub_error’ # 548| return grub_error (GRUB_ERR_BAD_MODULE, # 549| "incompatible license in module %s: %s", mod->name, # 550|-> (char *) e + s->sh_offset); # 551| } # 552| Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/kern/efi/efi.c: scope_hint: In function ‘grub_reboot’ grub-2.06/grub-core/kern/efi/efi.c:177:3: warning[-Wanalyzer-infinite-loop]: infinite loop # 175| efi_call_4 (grub_efi_system_table->runtime_services->reset_system, # 176| GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL); # 177|-> for (;;) ; # 178| } # 179| Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/kern/efi/efi.c: scope_hint: In function ‘grub_exit’ grub-2.06/grub-core/kern/efi/efi.c:191:3: warning[-Wanalyzer-infinite-loop]: infinite loop # 189| efi_call_4 (grub_efi_system_table->boot_services->exit, # 190| grub_efi_image_handle, rc, 0, 0); # 191|-> for (;;) ; # 192| } # 193| Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:20: included_from: Included from here. grub-2.06/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_efi_allocate_pages_real’ grub-2.06/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: grub-2.06/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_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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: grub-2.06/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_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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/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: grub-2.06/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_nx_init’ grub-2.06/grub-core/kern/efi/mm.c:626:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 626 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 627 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 624| { # 625| grub_dprintf ("nx", # 626|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 627| stack_current, err); # 628| grub_error_pop (); Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:642:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 642 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 643 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 640| { # 641| grub_dprintf ("nx", # 642|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 643| stack_current, err); # 644| grub_error_pop (); Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:663:25: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’} # 663 | "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 664 | stack_current, err); # | ~~~~~~~~~~~~~ # | | # | grub_addr_t {aka unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 661| { # 662| grub_dprintf ("nx", # 663|-> "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n", # 664| stack_current, err); # 665| grub_error_pop (); Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_get_mem_attrs’ grub-2.06/grub-core/kern/efi/mm.c:866:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 866 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # | ^~~~~~~~~~~~~~~~~~ # 867 | __func__, physaddr, physaddr+size-1, attrs); # | ~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:866:44: note: format string is defined here # 866 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # | ~^ # | | # | unsigned int # | %llx # 864| if (physaddr & 0xfff || size & 0xfff || size == 0 || attrs == NULL) # 865| { # 866|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # 867| __func__, physaddr, physaddr+size-1, attrs); # 868| return 0; Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:866:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 866 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # | ^~~~~~~~~~~~~~~~~~ # 867 | __func__, physaddr, physaddr+size-1, attrs); # | ~~~~~~~~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 864| if (physaddr & 0xfff || size & 0xfff || size == 0 || attrs == NULL) # 865| { # 866|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n", # 867| __func__, physaddr, physaddr+size-1, attrs); # 868| return 0; Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_update_mem_attrs’ grub-2.06/grub-core/kern/efi/mm.c:900:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 900 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # | ^~~~~~~~~~~~~~~~~~ # 901 | __func__, physaddr, physaddr + size - 1, # | ~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:900:44: note: format string is defined here # 900 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # | ~^ # | | # | unsigned int # | %llx # 898| if (physaddr & 0xfff || size & 0xfff || size == 0) # 899| { # 900|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # 901| __func__, physaddr, physaddr + size - 1, # 902| (set_attrs & GRUB_MEM_ATTR_R) ? "r" : "", Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:900:27: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘grub_efi_physical_address_t’ {aka ‘long long unsigned int’} # 900 | grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # | ^~~~~~~~~~~~~~~~~~ # 901 | __func__, physaddr, physaddr + size - 1, # | ~~~~~~~~~~~~~~~~~~~ # | | # | grub_efi_physical_address_t {aka long long unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 898| if (physaddr & 0xfff || size & 0xfff || size == 0) # 899| { # 900|-> grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n", # 901| __func__, physaddr, physaddr + size - 1, # 902| (set_attrs & GRUB_MEM_ATTR_R) ? "r" : "", Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:912:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 912 | 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:912:55: note: format string is defined here # 912 | grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 910| # 911| uefi_set_attrs = grub_mem_attrs_to_uefi_mem_attrs (set_attrs); # 912|-> grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 913| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 914| grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:912:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 912 | 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:912:64: note: format string is defined here # 912 | grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 910| # 911| uefi_set_attrs = grub_mem_attrs_to_uefi_mem_attrs (set_attrs); # 912|-> grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 913| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 914| grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:914:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 914 | 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:914:57: note: format string is defined here # 914 | grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 912| grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 913| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 914|-> grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # 915| if (uefi_set_attrs) # 916| efi_status = efi_call_4(proto->set_memory_attributes, Error: COMPILER_WARNING: grub-2.06/grub-core/kern/efi/mm.c:914:23: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 914 | 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.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/kern/efi/mm.c:914:66: note: format string is defined here # 914 | grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # | ~~^ # | | # | long unsigned int # | %llx # 912| grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs); # 913| uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs); # 914|-> grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs); # 915| if (uefi_set_attrs) # 916| efi_status = efi_call_4(proto->set_memory_attributes, Error: CLANG_WARNING: grub-2.06/grub-core/kern/emu/main.c:246:7: warning[deadcode.DeadStores]: Value stored to 'mods' is never read # 244| # 245| grub_util_load_image (arguments.mem_disk, mods); # 246|-> mods = (char *) mods + memdisk_size; # 247| } # 248| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/kern/env.c: scope_hint: In function ‘grub_register_variable_hook’ grub-2.06/grub-core/kern/env.c:214:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘var’ # 212| } # 213| # 214|-> var->read_hook = read_hook; # 215| var->write_hook = write_hook; # 216| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/kern/env.c: scope_hint: In function ‘grub_env_export’ grub-2.06/grub-core/kern/env.c:235:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘var’ # 233| var = grub_env_find (name); # 234| } # 235|-> var->global = 1; # 236| # 237| return GRUB_ERR_NONE; Error: COMPILER_WARNING (CWE-569): grub-2.06/grub-core/kern/file.c: scope_hint: In function ‘grub_file_read’ grub-2.06/grub-core/kern/file.c:179:18: warning[-Wtype-limits]: comparison of unsigned expression in ‘>= 0’ is always true # 179 | if (file->size >= 0) # | ^~ # 177| # 178| #ifdef GRUB_MACHINE_EMU # 179|-> if (file->size >= 0) # 180| { # 181| #endif Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/kern/parser.c: scope_hint: In function ‘terminate_arg’ grub-2.06/grub-core/kern/parser.c:142:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 140| return GRUB_ERR_NONE; # 141| # 142|-> if (*(const char *) grub_buffer_peek_data_at (buffer, unread - 1) == '\0') # 143| return GRUB_ERR_NONE; # 144| Error: CLANG_WARNING: grub-2.06/grub-core/lib/arg.c:255:7: warning[core.NullDereference]: Array access (from variable 'arg') results in a null pointer dereference # 253| /* No option is used. */ # 254| if ((num && (cmd->cmd->flags & GRUB_COMMAND_OPTIONS_AT_START)) # 255|-> || arg[0] != '-' || grub_strlen (arg) == 1) # 256| { # 257| if (add_arg (&argl, &num, arg) != 0) Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/lib/efi/halt.c: scope_hint: In function ‘grub_halt’ grub-2.06/grub-core/lib/efi/halt.c:40:9: warning[-Wanalyzer-infinite-loop]: infinite loop # 38| GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL); # 39| # 40|-> while (1); # 41| } Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:647:3: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 645| hol_find_entry (struct hol *hol, const char *name) # 646| { # 647|-> struct hol_entry *entry = hol->entries; # 648| unsigned num_entries = hol->num_entries; # 649| Error: CPPCHECK_WARNING (CWE-476): grub-2.06/grub-core/lib/gnulib/argp-help.c:1033: error[ctunullpointer]: Null pointer dereference: argp # 1031| argp_hol (const struct argp *argp, struct hol_cluster *cluster) # 1032| { # 1033|-> const struct argp_child *child = argp->children; # 1034| struct hol *hol = make_hol (argp, cluster); # 1035| if (child) Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:1464:7: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1462| hol_usage (struct hol *hol, argp_fmtstream_t stream) # 1463| { # 1464|-> if (hol->num_entries > 0) # 1465| { # 1466| unsigned nentries; Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:1745:19: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1743| /* Just show where the options go. */ # 1744| { # 1745|-> if (hol->num_entries > 0) # 1746| __argp_fmtstream_puts (fs, dgettext (argp->argp_domain, # 1747| " [OPTION...]")); Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:1774:46: warning[core.NullDereference]: Access to field 'argp_domain' results in a dereference of a null pointer (loaded from variable 'argp') # 1772| if (flags & ARGP_HELP_SEE) # 1773| { # 1774|-> __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\ # 1775| Try '%s --help' or '%s --usage' for more information.\n"), # 1776| name, name); Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:1784:11: warning[core.NullDereference]: Access to field 'num_entries' results in a dereference of a null pointer (loaded from variable 'hol') # 1782| { # 1783| /* Print info about all the options. */ # 1784|-> if (hol->num_entries > 0) # 1785| { # 1786| if (anything) Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:1804:7: warning[deadcode.DeadStores]: Value stored to 'anything' is never read # 1802| "Report bugs to %s.\n"), # 1803| argp_program_bug_address); # 1804|-> anything = 1; # 1805| } # 1806| Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-help.c:2002:31: warning[core.NullDereference]: Access to field 'root_argp' results in a dereference of a null pointer (loaded from variable 'state') # 2000| # endif # 2001| if (! s && ! (s = strerror (errnum))) # 2002|-> s = dgettext (state->root_argp->argp_domain, # 2003| "Unknown system error"); # 2004| fputs_unlocked (s, stream); Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/argp-parse.c:806:13: warning[unix.Malloc]: Potential memory leak # 804| &parser->opt_data); # 805| else # 806|-> opt = _getopt_long_r (parser->state.argc, parser->state.argv, # 807| parser->short_opts, parser->long_opts, 0, # 808| &parser->opt_data); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/base64.c:48: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘imalloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:51:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘unsigned int’ # 51 | return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # | ^~ # 49| imalloc (idx_t s) # 50| { # 51|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 52| } # 53| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/base64.c:48: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘imalloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:51:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘long unsigned int’ # 51 | return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # | ^~ # 49| imalloc (idx_t s) # 50| { # 51|-> return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem (); # 52| } # 53| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘irealloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:61:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘unsigned int’ # 61 | return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem (); # | ^~ # 59| /* Work around GNU realloc glitch by treating a zero size as if it # 60| were 1, so that returning NULL is equivalent to failing. */ # 61|-> return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem (); # 62| } # 63| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘irealloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:61:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘long unsigned int’ # 61 | return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem (); # | ^~ # 59| /* Work around GNU realloc glitch by treating a zero size as if it # 60| were 1, so that returning NULL is equivalent to failing. */ # 61|-> return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem (); # 62| } # 63| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘icalloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:69:16: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘idx_t’ {aka ‘long int’} # 69 | if (SIZE_MAX < n) # | ^ # 67| icalloc (idx_t n, idx_t s) # 68| { # 69|-> if (SIZE_MAX < n) # 70| { # 71| if (s != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘icalloc’ grub-2.06/grub-core/lib/gnulib/ialloc.h:69:16: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘idx_t’ {aka ‘int’} # 69 | if (SIZE_MAX < n) # | ^ # 67| icalloc (idx_t n, idx_t s) # 68| { # 69|-> if (SIZE_MAX < n) # 70| { # 71| if (s != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h:75:16: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘idx_t’ {aka ‘long int’} # 75 | if (SIZE_MAX < s) # | ^ # 73| n = 0; # 74| } # 75|-> if (SIZE_MAX < s) # 76| { # 77| if (n != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h:75:16: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘idx_t’ {aka ‘int’} # 75 | if (SIZE_MAX < s) # | ^ # 73| n = 0; # 74| } # 75|-> if (SIZE_MAX < s) # 76| { # 77| if (n != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘ireallocarray’ grub-2.06/grub-core/lib/gnulib/ialloc.h:91:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘unsigned int’ # 91 | return (n <= SIZE_MAX && s <= SIZE_MAX # | ^~ # 89| if (n == 0 || s == 0) # 90| n = s = 1; # 91|-> return (n <= SIZE_MAX && s <= SIZE_MAX # 92| ? reallocarray (p, n, s) # 93| : _gl_alloc_nomem ()); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘ireallocarray’ grub-2.06/grub-core/lib/gnulib/ialloc.h:91:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘long unsigned int’ # 91 | return (n <= SIZE_MAX && s <= SIZE_MAX # | ^~ # 89| if (n == 0 || s == 0) # 90| n = s = 1; # 91|-> return (n <= SIZE_MAX && s <= SIZE_MAX # 92| ? reallocarray (p, n, s) # 93| : _gl_alloc_nomem ()); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h:91:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘int’} and ‘unsigned int’ # 91 | return (n <= SIZE_MAX && s <= SIZE_MAX # | ^~ # 89| if (n == 0 || s == 0) # 90| n = s = 1; # 91|-> return (n <= SIZE_MAX && s <= SIZE_MAX # 92| ? reallocarray (p, n, s) # 93| : _gl_alloc_nomem ()); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/ialloc.h:91:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘idx_t’ {aka ‘long int’} and ‘long unsigned int’ # 91 | return (n <= SIZE_MAX && s <= SIZE_MAX # | ^~ # 89| if (n == 0 || s == 0) # 90| n = s = 1; # 91|-> return (n <= SIZE_MAX && s <= SIZE_MAX # 92| ? reallocarray (p, n, s) # 93| : _gl_alloc_nomem ()); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:74: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘re_compile_fastmap_iter’ grub-2.06/grub-core/lib/gnulib/regcomp.c:304:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 304 | while (++node < dfa->nodes_len # | ^ # 302| p = buf; # 303| *p++ = dfa->nodes[node].opr.c; # 304|-> while (++node < dfa->nodes_len # 305| && dfa->nodes[node].type == CHARACTER # 306| && dfa->nodes[node].mb_partial) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:74: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘re_compile_fastmap_iter’ grub-2.06/grub-core/lib/gnulib/regcomp.c:304:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 304 | while (++node < dfa->nodes_len # | ^ # 302| p = buf; # 303| *p++ = dfa->nodes[node].opr.c; # 304|-> while (++node < dfa->nodes_len # 305| && dfa->nodes[node].type == CHARACTER # 306| && dfa->nodes[node].mb_partial) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:310:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ # 310 | &state) == p - buf # | ^~ # 308| memset (&state, '\0', sizeof (state)); # 309| if (__mbrtowc (&wc, (const char *) buf, p - buf, # 310|-> &state) == p - buf # 311| && (__wcrtomb ((char *) buf, __towlower (wc), &state) # 312| != (size_t) -1)) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:310:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘unsigned int’} and ‘int’ # 310 | &state) == p - buf # | ^~ # 308| memset (&state, '\0', sizeof (state)); # 309| if (__mbrtowc (&wc, (const char *) buf, p - buf, # 310|-> &state) == p - buf # 311| && (__wcrtomb ((char *) buf, __towlower (wc), &state) # 312| != (size_t) -1)) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:319:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 319 | for (i = 0, ch = 0; i < BITSET_WORDS; ++i) # | ^ # 317| { # 318| int i, ch; # 319|-> for (i = 0, ch = 0; i < BITSET_WORDS; ++i) # 320| { # 321| int j; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:323:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 323 | for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # | ^ # 321| int j; # 322| bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; # 323|-> for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # 324| if (w & ((bitset_word_t) 1 << j)) # 325| re_set_fastmap (fastmap, icase, ch); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘free_dfa_content’ grub-2.06/grub-core/lib/gnulib/regcomp.c:564:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 564 | for (i = 0; i < dfa->nodes_len; ++i) # | ^ # 562| # 563| if (dfa->nodes) # 564|-> for (i = 0; i < dfa->nodes_len; ++i) # 565| free_token (dfa->nodes + i); # 566| re_free (dfa->nexts); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘free_dfa_content’ grub-2.06/grub-core/lib/gnulib/regcomp.c:564:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 564 | for (i = 0; i < dfa->nodes_len; ++i) # | ^ # 562| # 563| if (dfa->nodes) # 564|-> for (i = 0; i < dfa->nodes_len; ++i) # 565| free_token (dfa->nodes + i); # 566| re_free (dfa->nexts); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:567:17: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 567 | for (i = 0; i < dfa->nodes_len; ++i) # | ^ # 565| free_token (dfa->nodes + i); # 566| re_free (dfa->nexts); # 567|-> for (i = 0; i < dfa->nodes_len; ++i) # 568| { # 569| if (dfa->eclosures != NULL) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:567:17: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 567 | for (i = 0; i < dfa->nodes_len; ++i) # | ^ # 565| free_token (dfa->nodes + i); # 566| re_free (dfa->nexts); # 567|-> for (i = 0; i < dfa->nodes_len; ++i) # 568| { # 569| if (dfa->eclosures != NULL) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:582:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘re_hashval_t’ {aka ‘unsigned int’} # 582 | for (i = 0; i <= dfa->state_hash_mask; ++i) # | ^~ # 580| # 581| if (dfa->state_table) # 582|-> for (i = 0; i <= dfa->state_hash_mask; ++i) # 583| { # 584| struct re_state_table_entry *entry = dfa->state_table + i; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘init_dfa’ grub-2.06/grub-core/lib/gnulib/regcomp.c:870:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 870 | for (i = 0, ch = 0; i < BITSET_WORDS; ++i) # | ^ # 868| # 869| /* Set the bits corresponding to single byte chars. */ # 870|-> for (i = 0, ch = 0; i < BITSET_WORDS; ++i) # 871| for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # 872| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:871:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 871 | for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # | ^ # 869| /* Set the bits corresponding to single byte chars. */ # 870| for (i = 0, ch = 0; i < BITSET_WORDS; ++i) # 871|-> for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # 872| { # 873| wint_t wch = __btowc (ch); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘init_word_char’ grub-2.06/grub-core/lib/gnulib/regcomp.c:933:12: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 933 | for (; i < BITSET_WORDS; ++i) # | ^ # 931| # 932| general_case: # 933|-> for (; i < BITSET_WORDS; ++i) # 934| for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # 935| if (isalnum (ch) || ch == '_') Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:934:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 934 | for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # | ^ # 932| general_case: # 933| for (; i < BITSET_WORDS; ++i) # 934|-> for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) # 935| if (isalnum (ch) || ch == '_') # 936| dfa->word_char[i] |= (bitset_word_t) 1 << j; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_utf8’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1053:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1053 | for (node = 0; node < dfa->nodes_len; ++node) # | ^ # 1051| bool has_period = false; # 1052| # 1053|-> for (node = 0; node < dfa->nodes_len; ++node) # 1054| switch (dfa->nodes[node].type) # 1055| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_utf8’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1053:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1053 | for (node = 0; node < dfa->nodes_len; ++node) # | ^ # 1051| bool has_period = false; # 1052| # 1053|-> for (node = 0; node < dfa->nodes_len; ++node) # 1054| switch (dfa->nodes[node].type) # 1055| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1093:54: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 1093 | for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) # | ^ # 1091| ? 0 # 1092| : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); # 1093|-> for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) # 1094| { # 1095| if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1106:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1106 | for (node = 0; node < dfa->nodes_len; ++node) # | ^ # 1104| # 1105| if (mb_chars || has_period) # 1106|-> for (node = 0; node < dfa->nodes_len; ++node) # 1107| { # 1108| if (dfa->nodes[node].type == CHARACTER Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1106:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1106 | for (node = 0; node < dfa->nodes_len; ++node) # | ^ # 1104| # 1105| if (mb_chars || has_period) # 1106|-> for (node = 0; node < dfa->nodes_len; ++node) # 1107| { # 1108| if (dfa->nodes[node].type == CHARACTER Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘analyze’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1143:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1143 | for (i = 0; i < preg->re_nsub; i++) # | ^ # 1141| { # 1142| Idx i; # 1143|-> for (i = 0; i < preg->re_nsub; i++) # 1144| dfa->subexp_map[i] = i; # 1145| preorder (dfa->str_tree, optimize_subexps, dfa); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘analyze’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1143:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1143 | for (i = 0; i < preg->re_nsub; i++) # | ^ # 1141| { # 1142| Idx i; # 1143|-> for (i = 0; i < preg->re_nsub; i++) # 1144| dfa->subexp_map[i] = i; # 1145| preorder (dfa->str_tree, optimize_subexps, dfa); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1146:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1146 | for (i = 0; i < preg->re_nsub; i++) # | ^ # 1144| dfa->subexp_map[i] = i; # 1145| preorder (dfa->str_tree, optimize_subexps, dfa); # 1146|-> for (i = 0; i < preg->re_nsub; i++) # 1147| if (dfa->subexp_map[i] != i) # 1148| break; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1146:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1146 | for (i = 0; i < preg->re_nsub; i++) # | ^ # 1144| dfa->subexp_map[i] = i; # 1145| preorder (dfa->str_tree, optimize_subexps, dfa); # 1146|-> for (i = 0; i < preg->re_nsub; i++) # 1147| if (dfa->subexp_map[i] != i) # 1148| break; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1149:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1149 | if (i == preg->re_nsub) # | ^~ # 1147| if (dfa->subexp_map[i] != i) # 1148| break; # 1149|-> if (i == preg->re_nsub) # 1150| { # 1151| re_free (dfa->subexp_map); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1149:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1149 | if (i == preg->re_nsub) # | ^~ # 1147| if (dfa->subexp_map[i] != i) # 1148| break; # 1149|-> if (i == preg->re_nsub) # 1150| { # 1151| re_free (dfa->subexp_map); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_subexps’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1274:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 1274 | if (other_idx < BITSET_WORD_BITS) # | ^ # 1272| # 1273| dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; # 1274|-> if (other_idx < BITSET_WORD_BITS) # 1275| dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); # 1276| } Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘lower_subexp’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1318:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 1318 | && (node->token.opr.idx >= BITSET_WORD_BITS # | ^~ # 1316| this case is the sed "script" /\(\)/x. */ # 1317| && node->left != NULL # 1318|-> && (node->token.opr.idx >= BITSET_WORD_BITS # 1319| || !(dfa->used_bkref_map # 1320| & ((bitset_word_t) 1 << node->token.opr.idx)))) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_inveclosure’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1594:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1594 | for (idx = 0; idx < dfa->nodes_len; ++idx) # | ^ # 1592| Idx src, idx; # 1593| bool ok; # 1594|-> for (idx = 0; idx < dfa->nodes_len; ++idx) # 1595| re_node_set_init_empty (dfa->inveclosures + idx); # 1596| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_inveclosure’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1594:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1594 | for (idx = 0; idx < dfa->nodes_len; ++idx) # | ^ # 1592| Idx src, idx; # 1593| bool ok; # 1594|-> for (idx = 0; idx < dfa->nodes_len; ++idx) # 1595| re_node_set_init_empty (dfa->inveclosures + idx); # 1596| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1597:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1597 | for (src = 0; src < dfa->nodes_len; ++src) # | ^ # 1595| re_node_set_init_empty (dfa->inveclosures + idx); # 1596| # 1597|-> for (src = 0; src < dfa->nodes_len; ++src) # 1598| { # 1599| Idx *elems = dfa->eclosures[src].elems; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:1597:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1597 | for (src = 0; src < dfa->nodes_len; ++src) # | ^ # 1595| re_node_set_init_empty (dfa->inveclosures + idx); # 1596| # 1597|-> for (src = 0; src < dfa->nodes_len; ++src) # 1598| { # 1599| Idx *elems = dfa->eclosures[src].elems; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_eclosure’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1625:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1625 | if (node_idx == dfa->nodes_len) # | ^~ # 1623| reg_errcode_t err; # 1624| re_node_set eclosure_elem; # 1625|-> if (node_idx == dfa->nodes_len) # 1626| { # 1627| if (!incomplete) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_eclosure’ grub-2.06/grub-core/lib/gnulib/regcomp.c:1625:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1625 | if (node_idx == dfa->nodes_len) # | ^~ # 1623| reg_errcode_t err; # 1624| re_node_set eclosure_elem; # 1625|-> if (node_idx == dfa->nodes_len) # 1626| { # 1627| if (!incomplete) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘parse_bracket_exp’ grub-2.06/grub-core/lib/gnulib/regcomp.c:3240:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 3240 | for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) # | ^ # 3238| if (__glibc_unlikely (mbc_tree == NULL)) # 3239| goto parse_bracket_exp_espace; # 3240|-> for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) # 3241| if (sbcset[sbc_idx]) # 3242| break; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regcomp.c:3245:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 3245 | if (sbc_idx < BITSET_WORDS) # | ^ # 3243| /* If there are no bits set in sbcset, there is no point # 3244| of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ # 3245|-> if (sbc_idx < BITSET_WORDS) # 3246| { # 3247| /* Build a tree for simple bracket. */ Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/libc-config.h:164: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex.c:23: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_realloc_buffers’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:143:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 143 | < new_buf_len)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 141| const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); # 142| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) # 143|-> < new_buf_len)) # 144| return REG_ESPACE; # 145| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/libc-config.h:164: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex.c:23: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_realloc_buffers’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:143:29: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 143 | < new_buf_len)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 141| const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); # 142| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) # 143|-> < new_buf_len)) # 144| return REG_ESPACE; # 145| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:73: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘build_wcs_upper_buffer’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:397:44: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Idx’ {aka ‘int’} # 397 | if (byte_idx + mbcdlen > pstr->bufs_len) # | ^ # 395| size_t i; # 396| # 397|-> if (byte_idx + mbcdlen > pstr->bufs_len) # 398| { # 399| pstr->cur_state = prev_st; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:73: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘build_wcs_upper_buffer’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:397:44: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘unsigned int’} and ‘Idx’ {aka ‘int’} # 397 | if (byte_idx + mbcdlen > pstr->bufs_len) # | ^ # 395| size_t i; # 396| # 397|-> if (byte_idx + mbcdlen > pstr->bufs_len) # 398| { # 399| pstr->cur_state = prev_st; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_reconstruct’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:737:48: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘unsigned int’} # 737 | if (raw + offset - p <= mbclen # | ^~ # 735| mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, # 736| &cur_state); # 737|-> if (raw + offset - p <= mbclen # 738| && mbclen < (size_t) -2) # 739| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_reconstruct’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:737:48: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} # 737 | if (raw + offset - p <= mbclen # | ^~ # 735| mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, # 736| &cur_state); # 737|-> if (raw + offset - p <= mbclen # 738| && mbclen < (size_t) -2) # 739| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:71: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_not’ grub-2.06/grub-core/lib/gnulib/regex_internal.h:749:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 749 | for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) # | ^ # 747| { # 748| int bitset_i; # 749|-> for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) # 750| set[bitset_i] = ~set[bitset_i]; # 751| if (SBC_MAX % BITSET_WORD_BITS != 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_merge’ grub-2.06/grub-core/lib/gnulib/regex_internal.h:761:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 761 | for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) # | ^ # 759| { # 760| int bitset_i; # 761|-> for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) # 762| dest[bitset_i] |= src[bitset_i]; # 763| } Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_mask’ grub-2.06/grub-core/lib/gnulib/regex_internal.h:769:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 769 | for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) # | ^ # 767| { # 768| int bitset_i; # 769|-> for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) # 770| dest[bitset_i] &= src[bitset_i]; # 771| } Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_copy_regs’ grub-2.06/grub-core/lib/gnulib/regexec.c:481:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘__re_size_t’ {aka ‘unsigned int’} # 481 | if (__glibc_unlikely (need_regs > regs->num_regs)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 479| allocated, reallocate them. If we need fewer, just # 480| leave it alone. */ # 481|-> if (__glibc_unlikely (need_regs > regs->num_regs)) # 482| { # 483| regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex_internal.h:40: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regexec.c:502:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘__re_size_t’ {aka ‘unsigned int’} # 502 | DEBUG_ASSERT (nregs <= regs->num_regs); # | ^~ grub-2.06/grub-core/lib/gnulib/verify.h:300:22: note: in definition of macro ‘assume’ # 300 | # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) # | ^ grub-2.06/grub-core/lib/gnulib/regexec.c:502:7: note: in expansion of macro ‘DEBUG_ASSERT’ # 502 | DEBUG_ASSERT (nregs <= regs->num_regs); # | ^~~~~~~~~~~~ # 500| DEBUG_ASSERT (regs_allocated == REGS_FIXED); # 501| /* This function may not be called with REGS_FIXED and nregs too big. */ # 502|-> DEBUG_ASSERT (nregs <= regs->num_regs); # 503| rval = REGS_FIXED; # 504| } Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regex.c:75: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regexec.c:512:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘__re_size_t’ {aka ‘unsigned int’} # 512 | for ( ; i < regs->num_regs; ++i) # | ^ # 510| regs->end[i] = pmatch[i].rm_eo; # 511| } # 512|-> for ( ; i < regs->num_regs; ++i) # 513| regs->start[i] = regs->end[i] = -1; # 514| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_search_internal’ grub-2.06/grub-core/lib/gnulib/regexec.c:651:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 651 | <= mctx.input.bufs_len))) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 649| /* Avoid overflow. */ # 650| if (__glibc_unlikely ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) # 651|-> <= mctx.input.bufs_len))) # 652| { # 653| err = REG_ESPACE; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_search_internal’ grub-2.06/grub-core/lib/gnulib/regexec.c:651:30: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 651 | <= mctx.input.bufs_len))) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 649| /* Avoid overflow. */ # 650| if (__glibc_unlikely ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) # 651|-> <= mctx.input.bufs_len))) # 652| { # 653| err = REG_ESPACE; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:756:28: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘__re_size_t’ {aka ‘unsigned int’} and ‘Idx’ {aka ‘int’} # 756 | ch = (offset < mctx.input.valid_len # | ^ # 754| } # 755| /* Use buffer byte if OFFSET is in buffer, otherwise '\0'. */ # 756|-> ch = (offset < mctx.input.valid_len # 757| ? re_string_byte_at (&mctx.input, offset) : 0); # 758| if (fastmap[ch]) Error: CLANG_WARNING: grub-2.06/grub-core/lib/gnulib/regex.c:75: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regexec.c:810:5: warning[deadcode.DeadStores]: Value stored to 'match_last' is never read # 808| if (__glibc_unlikely (err != REG_NOMATCH)) # 809| goto free_return; # 810|-> match_last = -1; # 811| } # 812| else Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:829:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 829 | for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) # | ^ # 827| # 828| /* Initialize registers. */ # 829|-> for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) # 830| pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; # 831| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:829:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 829 | for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) # | ^ # 827| # 828| /* Initialize registers. */ # 829|-> for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) # 830| pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; # 831| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:850:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 850 | for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # | ^ # 848| the buffers so that we could assume that the matching starts # 849| from 0. */ # 850|-> for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # 851| if (pmatch[reg_idx].rm_so != -1) # 852| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:850:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 850 | for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # | ^ # 848| the buffers so that we could assume that the matching starts # 849| from 0. */ # 850|-> for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # 851| if (pmatch[reg_idx].rm_so != -1) # 852| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:874:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 874 | for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) # | ^ # 872| # 873| if (dfa->subexp_map) # 874|-> for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) # 875| if (dfa->subexp_map[reg_idx] != reg_idx) # 876| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:874:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘unsigned int’} # 874 | for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) # | ^ # 872| # 873| if (dfa->subexp_map) # 874|-> for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) # 875| if (dfa->subexp_map[reg_idx] != reg_idx) # 876| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘prune_impossible_nodes’ grub-2.06/grub-core/lib/gnulib/regexec.c:908:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 908 | <= match_last)) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 906| /* Avoid overflow. */ # 907| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) # 908|-> <= match_last)) # 909| return REG_ESPACE; # 910| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘prune_impossible_nodes’ grub-2.06/grub-core/lib/gnulib/regexec.c:908:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 908 | <= match_last)) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 906| /* Avoid overflow. */ # 907| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) # 908|-> <= match_last)) # 909| return REG_ESPACE; # 910| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘set_regs’ grub-2.06/grub-core/lib/gnulib/regexec.c:1410:41: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} # 1410 | for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # | ^ # 1408| if (fs) # 1409| { # 1410|-> for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # 1411| if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) # 1412| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘set_regs’ grub-2.06/grub-core/lib/gnulib/regexec.c:1410:41: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘size_t’ {aka ‘unsigned int’} # 1410 | for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # | ^ # 1408| if (fs) # 1409| { # 1410|-> for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) # 1411| if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) # 1412| { Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_dst_limits_calc_pos_1’ grub-2.06/grub-core/lib/gnulib/regexec.c:1893:34: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 1893 | if (subexp_idx < BITSET_WORD_BITS # | ^ # 1891| continue; # 1892| # 1893|-> if (subexp_idx < BITSET_WORD_BITS # 1894| && !(ent->eps_reachable_subexps_map # 1895| & ((bitset_word_t) 1 << subexp_idx))) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:1921:34: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 1921 | if (subexp_idx < BITSET_WORD_BITS) # | ^ # 1919| return 0; # 1920| # 1921|-> if (subexp_idx < BITSET_WORD_BITS) # 1922| ent->eps_reachable_subexps_map # 1923| &= ~((bitset_word_t) 1 << subexp_idx); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_subexp_matching_top’ grub-2.06/grub-core/lib/gnulib/regexec.c:2371:39: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 2371 | && dfa->nodes[node].opr.idx < BITSET_WORD_BITS # | ^ # 2369| Idx node = cur_nodes->elems[node_idx]; # 2370| if (dfa->nodes[node].type == OP_OPEN_SUBEXP # 2371|-> && dfa->nodes[node].opr.idx < BITSET_WORD_BITS # 2372| && (dfa->used_bkref_map # 2373| & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_arrival’ grub-2.06/grub-core/lib/gnulib/regexec.c:2832:65: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 2832 | if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 2830| return REG_ESPACE; # 2831| new_alloc = old_alloc + incr_alloc; # 2832|-> if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc)) # 2833| return REG_ESPACE; # 2834| new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_arrival’ grub-2.06/grub-core/lib/gnulib/regexec.c:2832:65: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 2832 | if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 2830| return REG_ESPACE; # 2831| new_alloc = old_alloc + incr_alloc; # 2832|-> if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc)) # 2833| return REG_ESPACE; # 2834| new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘build_trtable’ grub-2.06/grub-core/lib/gnulib/regexec.c:3345:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3345 | for (i = 0; i < BITSET_WORDS; ++i) # | ^ # 3343| # 3344| /* For all characters ch...: */ # 3345|-> for (i = 0; i < BITSET_WORDS; ++i) # 3346| for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; # 3347| elem; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3376:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3376 | for (i = 0; i < BITSET_WORDS; ++i) # | ^ # 3374| # 3375| /* For all characters ch...: */ # 3376|-> for (i = 0; i < BITSET_WORDS; ++i) # 3377| for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; # 3378| elem; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘group_nodes_into_DFAstates’ grub-2.06/grub-core/lib/gnulib/regexec.c:3502:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3502 | for (j = 0; j < BITSET_WORDS; ++j) # | ^ # 3500| } # 3501| if (dfa->mb_cur_max > 1) # 3502|-> for (j = 0; j < BITSET_WORDS; ++j) # 3503| any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); # 3504| else Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3505:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3505 | for (j = 0; j < BITSET_WORDS; ++j) # | ^ # 3503| any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); # 3504| else # 3505|-> for (j = 0; j < BITSET_WORDS; ++j) # 3506| any_set |= (accepts[j] &= dfa->word_char[j]); # 3507| if (!any_set) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3519:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3519 | for (j = 0; j < BITSET_WORDS; ++j) # | ^ # 3517| } # 3518| if (dfa->mb_cur_max > 1) # 3519|-> for (j = 0; j < BITSET_WORDS; ++j) # 3520| any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); # 3521| else Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3522:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3522 | for (j = 0; j < BITSET_WORDS; ++j) # | ^ # 3520| any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); # 3521| else # 3522|-> for (j = 0; j < BITSET_WORDS; ++j) # 3523| any_set |= (accepts[j] &= ~dfa->word_char[j]); # 3524| if (!any_set) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3544:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3544 | for (k = 0; k < BITSET_WORDS; ++k) # | ^ # 3542| /* Enumerate the intersection set of this state and 'accepts'. */ # 3543| has_intersec = 0; # 3544|-> for (k = 0; k < BITSET_WORDS; ++k) # 3545| has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; # 3546| /* And skip if the intersection set is empty. */ Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c:3552:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘Idx’ {aka ‘int’} and ‘long unsigned int’ # 3552 | for (k = 0; k < BITSET_WORDS; ++k) # | ^ # 3550| /* Then check if this state is a subset of 'accepts'. */ # 3551| not_subset = not_consumed = 0; # 3552|-> for (k = 0; k < BITSET_WORDS; ++k) # 3553| { # 3554| not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘extend_buffers’ grub-2.06/grub-core/lib/gnulib/regexec.c:3954:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 3954 | <= pstr->bufs_len)) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 3952| /* Avoid overflow. */ # 3953| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 # 3954|-> <= pstr->bufs_len)) # 3955| return REG_ESPACE; # 3956| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘extend_buffers’ grub-2.06/grub-core/lib/gnulib/regexec.c:3954:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 3954 | <= pstr->bufs_len)) # | ^~ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 3952| /* Avoid overflow. */ # 3953| if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 # 3954|-> <= pstr->bufs_len)) # 3955| return REG_ESPACE; # 3956| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘match_ctx_init’ grub-2.06/grub-core/lib/gnulib/regexec.c:4019:71: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘Idx’ {aka ‘int’} # 4019 | if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 4017| MAX (sizeof (struct re_backref_cache_entry), # 4018| sizeof (re_sub_match_top_t *)); # 4019|-> if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n)) # 4020| return REG_ESPACE; # 4021| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘match_ctx_init’ grub-2.06/grub-core/lib/gnulib/regexec.c:4019:71: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Idx’ {aka ‘int’} # 4019 | if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n)) # | ^ grub-2.06/grub-core/lib/gnulib/cdefs.h:510:52: note: in definition of macro ‘__glibc_unlikely’ # 510 | # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # | ^~~~ # 4017| MAX (sizeof (struct re_backref_cache_entry), # 4018| sizeof (re_sub_match_top_t *)); # 4019|-> if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n)) # 4020| return REG_ESPACE; # 4021| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/gnulib/vasnprintf.c: scope_hint: In function ‘vasnprintf’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1993:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘result’ grub-2.06/grub-core/lib/gnulib/printf-parse.h:29: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/vasnprintf.c:96: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1992:13: note: in expansion of macro ‘ENSURE_ALLOCATION’ # 1991| augmented_length = xsum (length, 1); # 1992| ENSURE_ALLOCATION (augmented_length); # 1993|-> result[length] = '%'; # 1994| length = augmented_length; # 1995| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/gnulib/vasnprintf.c:5204:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf_malloced’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:5199:17: note: in expansion of macro ‘ENSURE_ALLOCATION’ # 5202| /* Prepare checking whether snprintf returns the count # 5203| via %n. */ # 5204|-> *(TCHAR_T *) (result + length) = '\0'; # 5205| #endif # 5206| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/gnulib/vasnprintf.c:5204:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘result’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’ grub-2.06/grub-core/lib/gnulib/vasnprintf.c:5199:17: note: in expansion of macro ‘ENSURE_ALLOCATION’ # 5202| /* Prepare checking whether snprintf returns the count # 5203| via %n. */ # 5204|-> *(TCHAR_T *) (result + length) = '\0'; # 5205| #endif # 5206| Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/lib/i386/reboot.c: scope_hint: In function ‘grub_reboot’ grub-2.06/grub-core/lib/i386/reboot.c:40:11: warning[-Wanalyzer-infinite-loop]: infinite loop # 38| relocator = grub_relocator_new (); # 39| if (!relocator) # 40|-> while (1); # 41| err = grub_relocator_alloc_chunk_align (relocator, &ch, 0x1000, 0x1000, # 42| grub_reboot_end - grub_reboot_start, Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/lib/i386/reboot.c:46:11: warning[-Wanalyzer-infinite-loop]: infinite loop # 44| 0); # 45| if (err) # 46|-> while (1); # 47| buf = get_virtual_current_address (ch); # 48| grub_memcpy (buf, grub_reboot_start, grub_reboot_end - grub_reboot_start); Error: CLANG_WARNING: grub-2.06/grub-core/lib/i386/reboot.c:59:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 57| grub_stop_floppy (); # 58| # 59|-> err = grub_relocator16_boot (relocator, state); # 60| # 61| while (1); Error: CLANG_WARNING: grub-2.06/grub-core/lib/i386/reboot.c:59:9: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'ebx') # 57| grub_stop_floppy (); # 58| # 59|-> err = grub_relocator16_boot (relocator, state); # 60| # 61| while (1); Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/lib/i386/reboot.c:61:9: warning[-Wanalyzer-infinite-loop]: infinite loop grub-2.06/grub-core/lib/i386/reboot.c:23: included_from: Included from here. grub-2.06/grub-core/lib/i386/reboot.c:26: included_from: Included from here. grub-2.06/include/grub/i386/floppy.h:25: included_from: Included from here. # 59| err = grub_relocator16_boot (relocator, state); # 60| # 61|-> while (1); # 62| } # 63| Error: COMPILER_WARNING (CWE-1071): grub-2.06/grub-core/lib/libgcrypt-grub/cipher/rijndael.c: scope_hint: In function ‘do_setkey’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/rijndael.c:229:9: warning[-Wempty-body]: suggest braces around empty body in an ‘if’ statement # 229 | ; # | ^ # 227| # 228| if (0) # 229|-> ; # 230| #ifdef USE_PADLOCK # 231| else if ((_gcry_get_hw_features () & HWF_PADLOCK_AES)) Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/lib/libgcrypt-grub/cipher/rijndael.c:352:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ # 352 | for (i = 0; i < keylen; i++) # | ^ # 350| { # 351| #define W (ctx->keyschenc) # 352|-> for (i = 0; i < keylen; i++) # 353| { # 354| k[i >> 2][i & 3] = key[i]; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c: scope_hint: In function ‘transform’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c:142:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘x[1]’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c:98:41: note: in definition of macro ‘R’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c:264:7: note: in expansion of macro ‘TRANSFORM’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c:264:7: note: in expansion of macro ‘TRANSFORM’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha1.c:98:41: note: in definition of macro ‘R’ # 140| /* Transform. */ # 141| R( a, b, c, d, e, F1, K1, x[ 0] ); # 142|-> R( e, a, b, c, d, F1, K1, x[ 1] ); # 143| R( d, e, a, b, c, F1, K1, x[ 2] ); # 144| R( c, d, e, a, b, F1, K1, x[ 3] ); Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c:44: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c: scope_hint: In function ‘transform’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘w[<unknown>]’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:12: note: in expansion of macro ‘S1’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:12: note: in expansion of macro ‘S1’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’ grub-2.06/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:12: note: in expansion of macro ‘S1’ # 195| w[i] = x[i]; # 196| for (; i < 64; i++) # 197|-> w[i] = S1(w[i-2]) + w[i-7] + S0(w[i-15]) + w[i-16]; # 198| # 199| for (i=0; i < 64;) Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:29: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c: scope_hint: In function ‘gcry_mpi_set’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:90:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:303:26: note: in expansion of macro ‘mpi_get_nlimbs’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:304:3: note: in expansion of macro ‘RESIZE_IF_NEEDED’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’ # 88| mpi_size_t _i; \ # 89| for( _i = 0; _i < (n); _i++ ) \ # 90|-> (d)[_i] = (s)[_i]; \ # 91| } while(0) # 92| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:35: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c: scope_hint: In function ‘gcry_mpi_powm’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:90:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:36: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:105:3: note: in expansion of macro ‘count_leading_zeros’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:105:3: note: in expansion of macro ‘count_leading_zeros’ grub-2.06/grub-core/lib/libgcrypt-grub/src/mpi.h:38: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:160:7: note: in expansion of macro ‘gcry_assert’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:160:7: note: in expansion of macro ‘gcry_assert’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:162:24: note: in expansion of macro ‘mpi_alloc_limb_space’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’ # 88| mpi_size_t _i; \ # 89| for( _i = 0; _i < (n); _i++ ) \ # 90|-> (d)[_i] = (s)[_i]; \ # 91| } while(0) # 92| Error: COMPILER_WARNING (CWE-563): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c:33: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c: scope_hint: In function ‘_gcry_mpih_mod_1’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:150:24: warning[-Wunused-but-set-variable]: variable ‘_ql’ set but not used # 150 | mpi_limb_t _q, _ql, _r; \ # | ^~~ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c:100:17: note: in expansion of macro ‘UDIV_QRNND_PREINV’ # 100 | UDIV_QRNND_PREINV(dummy, r, r, # | ^~~~~~~~~~~~~~~~~ # 148| #define UDIV_QRNND_PREINV(q, r, nh, nl, d, di) \ # 149| do { \ # 150|-> mpi_limb_t _q, _ql, _r; \ # 151| mpi_limb_t _xh, _xl; \ # 152| umul_ppmm (_q, _ql, (nh), (di)); \ Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:147:8: warning[-Wanalyzer-deref-before-check]: check of ‘w’ for NULL after already dereferencing it grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’ # 145| /* Ensure W has space enough to store the result. */ # 146| wsize = usize + vsize; # 147|-> if ( !mpi_is_secure (w) && (mpi_is_secure (u) || mpi_is_secure (v)) ) { # 148| /* w is not allocated in secure space but u or v is. To make sure # 149| * that no temporray results are stored in w, we temporary use Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpicoder.c: scope_hint: In function ‘do_get_buffer’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpicoder.c:246:30: warning[-Wanalyzer-deref-before-check]: check of ‘a’ for NULL after already dereferencing it # 244| *nbytes = a->nlimbs * BYTES_PER_MPI_LIMB; # 245| n = *nbytes? *nbytes:1; /* Allocate at least one byte. */ # 246|-> p = buffer = (force_secure || mpi_is_secure(a))? gcry_malloc_secure (n) # 247| : gcry_malloc (n); # 248| if (!buffer) Error: COMPILER_WARNING (CWE-563): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c:53:9: warning[-Wunused-but-set-variable]: variable ‘dummy’ set but not used # 53 | int dummy; # | ^~~~~ # 51| mpi_size_t i; # 52| mpi_limb_t n1, n0, r; # 53|-> int dummy; # 54| # 55| /* Botch: Should this be handled at all? Rely on callers? */ Error: COMPILER_WARNING (CWE-563): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c:403:9: warning[-Wunused-but-set-variable]: variable ‘dummy’ set but not used # 403 | int dummy; # | ^~~~~ # 401| mpi_size_t i; # 402| mpi_limb_t n1, n0, r; # 403|-> int dummy; # 404| # 405| if( !dividend_size ) Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:35: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c: scope_hint: In function ‘gcry_mpi_powm’ grub-2.06/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘expo’ for NULL after already dereferencing it grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’ # 108| # 109| #define mpi_is_opaque(a) ((a) && ((a)->flags&4)) # 110|-> #define mpi_is_secure(a) ((a) && ((a)->flags&1)) # 111| #define mpi_clear(a) _gcry_mpi_clear ((a)) # 112| #define mpi_alloc_like(a) _gcry_mpi_alloc_like((a)) Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘mod’ for NULL after already dereferencing it grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:75:10: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:75:10: note: in expansion of macro ‘mpi_is_secure’ # 108| # 109| #define mpi_is_opaque(a) ((a) && ((a)->flags&4)) # 110|-> #define mpi_is_secure(a) ((a) && ((a)->flags&1)) # 111| #define mpi_clear(a) _gcry_mpi_clear ((a)) # 112| #define mpi_alloc_like(a) _gcry_mpi_alloc_like((a)) Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘u’ for NULL after already dereferencing it grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’ # 108| # 109| #define mpi_is_opaque(a) ((a) && ((a)->flags&4)) # 110|-> #define mpi_is_secure(a) ((a) && ((a)->flags&1)) # 111| #define mpi_clear(a) _gcry_mpi_clear ((a)) # 112| #define mpi_alloc_like(a) _gcry_mpi_alloc_like((a)) Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:32: included_from: Included from here. grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c: scope_hint: In function ‘gcry_mpi_mul’ grub-2.06/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘v’ for NULL after already dereferencing it grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ grub-2.06/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’ # 108| # 109| #define mpi_is_opaque(a) ((a) && ((a)->flags&4)) # 110|-> #define mpi_is_secure(a) ((a) && ((a)->flags&1)) # 111| #define mpi_clear(a) _gcry_mpi_clear ((a)) # 112| #define mpi_alloc_like(a) _gcry_mpi_alloc_like((a)) Error: COMPILER_WARNING: grub-2.06/grub-core/lib/libtasn1/lib/element.c: scope_hint: In function ‘_asn1_append_sequence_set’ grub-2.06/grub-core/lib/libtasn1/lib/element.c:187:7: warning[-Wstringop-overflow=]: ‘_asn1_ltostr’ accessing 22 bytes in a region of size 21 grub-2.06/grub-core/lib/libtasn1/lib/element.c:187:7: note: referencing argument 2 of type ‘char[22]’ grub-2.06/grub-core/lib/libtasn1/lib/element.c:30: included_from: Included from here. grub-2.06/grub-core/lib/libtasn1/lib/parser_aux.h:70:7: note: in a call to function ‘_asn1_ltostr’ # 185| n++; # 186| temp[0] = '?'; # 187|-> _asn1_ltostr (n, temp + 1); # 188| } # 189| _asn1_set_name (p2, temp); Error: GCC_ANALYZER_WARNING (CWE-835): grub-2.06/grub-core/lib/libtasn1/lib/parser_aux.c: scope_hint: In function ‘_asn1_set_default_tag’ grub-2.06/grub-core/lib/libtasn1/lib/parser_aux.c:1158:19: warning[-Wanalyzer-infinite-loop]: infinite loop grub-2.06/grub-core/lib/libtasn1/lib/parser_aux.c:24: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/sys/types.h:24: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/string.h:23: included_from: Included from here. grub-2.06/grub-core/lib/libtasn1/lib/int.h:29: included_from: Included from here. # 1156| while (1) # 1157| { # 1158|-> p = _asn1_find_up (p); # 1159| if (p == node) # 1160| { Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/lib/libtasn1/lib/structure.c: scope_hint: In function ‘_asn1_copy_structure3’ grub-2.06/grub-core/lib/libtasn1/lib/structure.c:443:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p_d’ grub-2.06/grub-core/lib/posix_wrap/sys/types.h:24: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/string.h:23: included_from: Included from here. grub-2.06/grub-core/lib/libtasn1/lib/int.h:29: included_from: Included from here. grub-2.06/grub-core/lib/libtasn1/lib/structure.c:30: included_from: Included from here. # 441| continue; # 442| } # 443|-> p_d->start = p_s->start; # 444| p_d->end = p_s->end; # 445| } Error: COMPILER_WARNING (CWE-758): grub-2.06/grub-core/lib/pkcs1_v15.c:30:1: warning[-Wmissing-prototypes]: no previous prototype for ‘grub_crypto_rsa_pad’ # 30 | grub_crypto_rsa_pad (gcry_mpi_t * hmpi, grub_uint8_t * hval, # | ^~~~~~~~~~~~~~~~~~~ # 28| */ # 29| gcry_err_code_t # 30|-> grub_crypto_rsa_pad (gcry_mpi_t * hmpi, grub_uint8_t * hval, # 31| const gcry_md_spec_t * hash, gcry_mpi_t mod) # 32| { Error: GCC_ANALYZER_WARNING (CWE-401): grub-2.06/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:26: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/stdlib.h: scope_hint: In function ‘realloc’ grub-2.06/grub-core/lib/posix_wrap/stdlib.h:52:10: warning[-Wanalyzer-malloc-leak]: leak of ‘new_array’ grub-2.06/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:23: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:30:1: note: in expansion of macro ‘__libc_dynarray_emplace_enlarge’ grub-2.06/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:25: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:59:7: note: in expansion of macro ‘INT_MULTIPLY_WRAPV’ # 50| realloc (void *ptr, grub_size_t size) # 51| { # 52|-> return grub_realloc (ptr, size); # 53| } # 54| Error: GCC_ANALYZER_WARNING (CWE-401): grub-2.06/grub-core/lib/xzembed/xz_config.h:66: included_from: Included from here. grub-2.06/grub-core/lib/xzembed/xz_private.h:32: included_from: Included from here. grub-2.06/grub-core/lib/xzembed/xz_dec_lzma2.c:24: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/stdlib.h: scope_hint: In function ‘realloc’ grub-2.06/grub-core/lib/posix_wrap/stdlib.h:52:10: warning[-Wanalyzer-malloc-leak]: leak of ‘newdict’ # 50| realloc (void *ptr, grub_size_t size) # 51| { # 52|-> return grub_realloc (ptr, size); # 53| } # 54| Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/lib/gnulib/regex_internal.h:30: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex.c:71: included_from: Included from here. grub-2.06/grub-core/lib/posix_wrap/wchar.h: scope_hint: In function ‘mbrtowc’ grub-2.06/grub-core/lib/posix_wrap/wchar.h:63:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*ptr’ grub-2.06/grub-core/lib/gnulib/regex.c:75: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.h:449:27: note: in definition of macro ‘MAX’ grub-2.06/grub-core/lib/gnulib/regexec.c:3960:41: note: in expansion of macro ‘MIN’ grub-2.06/grub-core/lib/gnulib/regex.c:73: included_from: Included from here. grub-2.06/grub-core/lib/gnulib/regex_internal.c:382:18: note: in expansion of macro ‘__mbrtowc’ grub-2.06/grub-core/lib/gnulib/regex_internal.c:382:18: note: in expansion of macro ‘__mbrtowc’ # 61| for (ptr = s; ptr < s + n; ptr++) # 62| { # 63|-> if (!grub_utf8_process (*ptr, &ps->code, &ps->count)) # 64| return -1; # 65| if (ps->count) Error: CLANG_WARNING: grub-2.06/grub-core/lib/relocator.c:360:12: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer # 358| r2->first = r1->first; # 359| hl->next = r2->first; # 360|-> *rp = (*rp)->next; # 361| grub_free (g + 1); # 362| } Error: CLANG_WARNING: grub-2.06/grub-core/lib/relocator.c:403:38: warning[core.NullDereference]: Array access (via field 'freebytes') results in a null pointer dereference # 401| grub_memset (subchu->pre->freebytes, # 402| 0xff, sizeof (subchu->pre->freebytes) - off / 8); # 403|-> subchu->pre->freebytes[off / 8] |= ((1 << (8 - (off % 8))) - 1); # 404| check_leftover (subchu->post); # 405| } Error: CLANG_WARNING: grub-2.06/grub-core/lib/syslinux_parse.c:912:24: warning[deadcode.DeadStores]: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' # 910| || err == GRUB_ERR_BAD_FILENAME) # 911| { # 912|-> grub_errno = err = GRUB_ERR_NONE; # 913| print_string ("# File "); # 914| err = print (outbuf, newname, grub_strlen (newname)); Error: CLANG_WARNING: grub-2.06/grub-core/lib/syslinux_parse.c:1326:3: warning[deadcode.DeadStores]: Value stored to 'end' is never read # 1324| while (*ptr) # 1325| { # 1326|-> end = ptr; # 1327| for (end = ptr; *end && !grub_isspace (*end); end++); # 1328| if (*end) Error: CLANG_WARNING: grub-2.06/grub-core/lib/syslinux_parse.c:1340:6: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1338| for (ptr = end; *ptr && grub_isspace (*ptr); ptr++); # 1339| } # 1340|-> err = GRUB_ERR_NONE; # 1341| break; # 1342| } Error: GCC_ANALYZER_WARNING (CWE-131): grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c: scope_hint: In function ‘dec_stream_header’ grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:509:41: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:24: included_from: Included from here. grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:509:43: note: in expansion of macro ‘kmalloc’ # 507| if (s->hash->mdlen != s->hash_size) # 508| return XZ_OPTIONS_ERROR; # 509|-> s->hash_context = kmalloc(s->hash->contextsize, GFP_KERNEL); # 510| if (s->hash_context == NULL) # 511| { Error: GCC_ANALYZER_WARNING (CWE-131): grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:516:52: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:516:54: note: in expansion of macro ‘kmalloc’ # 514| } # 515| # 516|-> s->index.hash.hash_context = kmalloc(s->hash->contextsize, # 517| GFP_KERNEL); # 518| if (s->index.hash.hash_context == NULL) Error: GCC_ANALYZER_WARNING (CWE-131): grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:525:52: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’ grub-2.06/grub-core/lib/xzembed/xz_dec_stream.c:525:54: note: in expansion of macro ‘kmalloc’ # 523| } # 524| # 525|-> s->block.hash.hash_context = kmalloc(s->hash->contextsize, GFP_KERNEL); # 526| if (s->block.hash.hash_context == NULL) # 527| { Error: CLANG_WARNING: grub-2.06/grub-core/lib/zstd/zstd_decompress.c:1794:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1792| { # 1793| if (length > dstCapacity) return ERROR(dstSize_tooSmall); # 1794|-> memset(dst, value, length); # 1795| return length; # 1796| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘make_file_path’ grub-2.06/grub-core/loader/efi/chainloader.c:229:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘d’ grub-2.06/grub-core/loader/efi/chainloader.c:33: included_from: Included from here. grub-2.06/grub-core/loader/efi/chainloader.c:222:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:222:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/include/grub/file.h:23: included_from: Included from here. grub-2.06/include/grub/loader.h:23: included_from: Included from here. grub-2.06/grub-core/loader/efi/chainloader.c:22: included_from: Included from here. grub-2.06/grub-core/loader/efi/chainloader.c:142:12: note: in expansion of macro ‘grub_error’ grub-2.06/grub-core/loader/efi/chainloader.c:228:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:228:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:228:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:228:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ # 227| /* Fill the end of device path nodes. */ # 228| d = GRUB_EFI_NEXT_DEVICE_PATH (d); # 229|-> d->type = GRUB_EFI_END_DEVICE_PATH_TYPE; # 230| d->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; # 231| d->length = sizeof (*d); Error: COMPILER_WARNING: grub-2.06/include/grub/disk.h:31: included_from: Included from here. grub-2.06/include/grub/file.h:26: included_from: Included from here. grub-2.06/include/grub/loader.h:23: included_from: Included from here. grub-2.06/grub-core/loader/efi/chainloader.c:22: included_from: Included from here. grub-2.06/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘handle_image’ grub-2.06/grub-core/loader/efi/chainloader.c:827:26: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘unsigned int’} # 827 | grub_dprintf ("chain", "entry_point returned 0x%"PRIxGRUB_EFI_STATUS"\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 828 | efi_status); # | ~~~~~~~~~~ # | | # | grub_efi_status_t {aka unsigned int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 825| grub_efi_system_table); # 826| # 827|-> grub_dprintf ("chain", "entry_point returned 0x%"PRIxGRUB_EFI_STATUS"\n", # 828| efi_status); # 829| grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); Error: CLANG_WARNING: grub-2.06/grub-core/loader/efi/chainloader.c:830:3: warning[deadcode.DeadStores]: Value stored to 'efi_status' is never read # 828| efi_status); # 829| grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); # 830|-> efi_status = grub_efi_free_pool (buffer); # 831| # 832| return 1; Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_cmd_chainloader’ grub-2.06/grub-core/loader/efi/chainloader.c:1009:6: warning[-Wanalyzer-deref-before-check]: check of ‘*dev.disk’ for NULL after already dereferencing it # 1007| } # 1008| # 1009|-> if (dev->disk) # 1010| dev_handle = grub_efidisk_get_device_handle (dev->disk); # 1011| else if (dev->net && dev->net->server) Error: COMPILER_WARNING: grub-2.06/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_cmd_chainloader’ grub-2.06/grub-core/loader/efi/chainloader.c:1078:22: warning[-Wformat=]: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘grub_ssize_t’ {aka ‘int’} # 1078 | grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1079 | (void *)(grub_addr_t)address, fsize, 0llu); # | ~~~~~ # | | # | grub_ssize_t {aka int} grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ grub-2.06/grub-core/loader/efi/chainloader.c:1078:52: note: format string is defined here # 1078 | grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # | ~~^ # | | # | long unsigned int # | %u # 1076| * in doing anything but clearing the protection bits here. # 1077| */ # 1078|-> grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n", # 1079| (void *)(grub_addr_t)address, fsize, 0llu); # 1080| grub_update_mem_attrs (address, fsize, Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/loader/i386/bsd.c: scope_hint: In function ‘grub_bsd_add_meta’ grub-2.06/grub-core/loader/i386/bsd.c:273:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ptr’ # 271| return err; # 272| if (len) # 273|-> grub_memcpy (ptr, data, len); # 274| return GRUB_ERR_NONE; # 275| } Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/bsd.c:273:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 271| return err; # 272| if (len) # 273|-> grub_memcpy (ptr, data, len); # 274| return GRUB_ERR_NONE; # 275| } Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/bsd.c:767:14: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'rax') # 765| stack[1] = bi.tags; # 766| stack[2] = kern_end; # 767|-> return grub_relocator64_boot (relocator, state, 0, 0x40000000); # 768| } # 769| else Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/bsd.c:808:14: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'eax') # 806| stack[7] = bi.tags; # 807| stack[8] = kern_end; # 808|-> return grub_relocator32_boot (relocator, state, 0); # 809| } # 810| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/bsd.c:924:10: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'eax') # 922| stack[8] = ((grub_uint8_t *) arg0 - (grub_uint8_t *) buf0) + buf_target; # 923| # 924|-> return grub_relocator32_boot (relocator, state, 0); # 925| } # 926| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/bsd.c:1244:10: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'eax') # 1242| stack[6] = grub_mmap_get_lower () >> 10; # 1243| # 1244|-> return grub_relocator32_boot (relocator, state, 0); # 1245| } # 1246| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:89:15: warning[deadcode.DeadStores]: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' # 87| } # 88| if (err == GRUB_ERR_UNKNOWN_OS && (header->flags & MULTIBOOT_AOUT_KLUDGE)) # 89|-> grub_errno = err = GRUB_ERR_NONE; # 90| } # 91| if (header->flags & MULTIBOOT_AOUT_KLUDGE) Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:340:3: warning[deadcode.DeadStores]: Value stored to 'ptrorig' is never read # 338| #endif # 339| } # 340|-> ptrorig += sizeof (struct grub_vbe_mode_info_block); # 341| ptrdest += sizeof (struct grub_vbe_mode_info_block); # 342| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:341:3: warning[deadcode.DeadStores]: Value stored to 'ptrdest' is never read # 339| } # 340| ptrorig += sizeof (struct grub_vbe_mode_info_block); # 341|-> ptrdest += sizeof (struct grub_vbe_mode_info_block); # 342| # 343| #if GRUB_MACHINE_HAS_VBE Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:426:7: warning[deadcode.DeadStores]: Value stored to 'ptrorig' is never read # 424| mb_palette[i].blue = palette[i].b; # 425| } # 426|-> ptrorig += mbi->framebuffer_palette_num_colors # 427| * sizeof (struct multiboot_color); # 428| ptrdest += mbi->framebuffer_palette_num_colors Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:428:7: warning[deadcode.DeadStores]: Value stored to 'ptrdest' is never read # 426| ptrorig += mbi->framebuffer_palette_num_colors # 427| * sizeof (struct multiboot_color); # 428|-> ptrdest += mbi->framebuffer_palette_num_colors # 429| * sizeof (struct multiboot_color); # 430| } Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:602:7: warning[deadcode.DeadStores]: Value stored to 'ptrorig' is never read # 600| && mbi->framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED) # 601| { # 602|-> ptrorig += mbi->framebuffer_palette_num_colors # 603| * sizeof (struct multiboot_color); # 604| ptrdest += mbi->framebuffer_palette_num_colors Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:604:7: warning[deadcode.DeadStores]: Value stored to 'ptrdest' is never read # 602| ptrorig += mbi->framebuffer_palette_num_colors # 603| * sizeof (struct multiboot_color); # 604|-> ptrdest += mbi->framebuffer_palette_num_colors # 605| * sizeof (struct multiboot_color); # 606| } Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:611:3: warning[deadcode.DeadStores]: Value stored to 'ptrorig' is never read # 609| ptrorig += sizeof (struct grub_vbe_info_block); # 610| ptrdest += sizeof (struct grub_vbe_info_block); # 611|-> ptrorig += sizeof (struct grub_vbe_mode_info_block); # 612| ptrdest += sizeof (struct grub_vbe_mode_info_block); # 613| #endif Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/multiboot_mbi.c:612:3: warning[deadcode.DeadStores]: Value stored to 'ptrdest' is never read # 610| ptrdest += sizeof (struct grub_vbe_info_block); # 611| ptrorig += sizeof (struct grub_vbe_mode_info_block); # 612|-> ptrdest += sizeof (struct grub_vbe_mode_info_block); # 613| #endif # 614| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/pc/linux.c:72:10: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'ebx') # 70| grub_stop_floppy (); # 71| # 72|-> return grub_relocator16_boot (relocator, state); # 73| } # 74| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/pc/linux.c:377:3: warning[deadcode.DeadStores]: Value stored to 'kernel_offset' is never read # 375| len = grub_linux16_prot_size; # 376| grub_memcpy (grub_linux_prot_chunk, kernel + kernel_offset, len); # 377|-> kernel_offset += len; # 378| # 379| if (grub_errno == GRUB_ERR_NONE) Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/pc/plan9.c:527:3: warning[deadcode.DeadStores]: Value stored to 'configptr' is never read # 525| } # 526| # 527|-> configptr = grub_stpcpy (configptr, fill_ctx.pmap); # 528| # 529| { Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/xnu.c:815:10: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'ebx') # 813| state.eax = grub_xnu_arg1; # 814| # 815|-> return grub_relocator32_boot (grub_xnu_relocator, state, 0); # 816| } # 817| Error: CLANG_WARNING: grub-2.06/grub-core/loader/i386/xnu.c:1146:10: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'ebx') # 1144| grub_outb (0xff, 0xa1); # 1145| # 1146|-> return grub_relocator32_boot (grub_xnu_relocator, state, 0); # 1147| } # 1148| Error: CLANG_WARNING: grub-2.06/grub-core/loader/linux.c:55:12: warning[core.NullDereference]: Dereference of null pointer # 53| char *ptr = var; # 54| for (i = 28; i >= 0; i -= 4) # 55|-> *ptr++ = hex((val >> i) & 0xf); # 56| } # 57| Error: CLANG_WARNING: grub-2.06/grub-core/loader/linux.c:330:7: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read # 328| grub_memset (ptr, 0, ALIGN_UP_OVERHEAD (cursize, 4)); # 329| ptr += ALIGN_UP_OVERHEAD (cursize, 4); # 330|-> ptr = make_header (ptr, "TRAILER!!!", sizeof ("TRAILER!!!") - 1, 0, 0); # 331| } # 332| free_dir (root); Error: CLANG_WARNING: grub-2.06/grub-core/loader/multiboot_mbi2.c:558:37: warning[deadcode.DeadStores]: Value stored to 'tag' during its initialization is never read # 556| grub_video_driver_id_t driv_id; # 557| struct grub_video_palette_data palette[256]; # 558|-> struct multiboot_tag_framebuffer *tag # 559| = (struct multiboot_tag_framebuffer *) *ptrorig; # 560| Error: CLANG_WARNING: grub-2.06/grub-core/loader/xnu.c:771:3: warning[deadcode.DeadStores]: Value stored to 'buf' is never read # 769| grub_memcpy (buf, name, namelen); # 770| buf[namelen] = 0; # 771|-> buf += namelen + 1; # 772| # 773| /* Announce to kernel */ Error: CLANG_WARNING: grub-2.06/grub-core/loader/xnu.c:1218:2: warning[deadcode.DeadStores]: Value stored to 'newpath' is never read # 1216| newpath = grub_strchr (ctx.newdirname, ')'); # 1217| if (! newpath) # 1218|-> newpath = ctx.newdirname; # 1219| else # 1220| newpath++; Error: CLANG_WARNING: grub-2.06/grub-core/net/arp.c:100:3: warning[deadcode.DeadStores]: Value stored to 'tmp_ptr' is never read # 98| /* The target protocol address */ # 99| grub_memcpy (tmp_ptr, &proto_addr->ipv4, pln); # 100|-> tmp_ptr += pln; # 101| # 102| grub_memset (&target_mac_addr.mac, 0xff, hln); Error: CLANG_WARNING: grub-2.06/grub-core/net/arp.c:227:2: warning[deadcode.DeadStores]: Value stored to 'tmp_ptr' is never read # 225| /* The target protocol address */ # 226| grub_memcpy (tmp_ptr, &sender_addr.ipv4, pln); # 227|-> tmp_ptr += pln; # 228| # 229| target.type = hw_type; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/net/bootp.c: scope_hint: In function ‘dissect_url’ grub-2.06/grub-core/net/bootp.c:81:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’ # 79| l = p - ps; # 80| # 81|-> if (l > 2 && ps[0] == '[' && ps[l - 1] == ']') # 82| { # 83| *host = grub_malloc (l - 1); Error: CLANG_WARNING: grub-2.06/grub-core/net/bootp.c:472:2: warning[core.CallAndMessage]: Passed-by-value struct argument contains uninitialized data (e.g., field: 'option') # 470| rname = grub_xasprintf ("%s:default", name); # 471| if (rname) # 472|-> grub_net_add_route_gw (rname, target, gw, 0); # 473| grub_free (rname); # 474| } Error: CLANG_WARNING: grub-2.06/grub-core/net/dns.c:577:47: warning[core.NullDereference]: Array access (from variable 'servers') results in a null pointer dereference # 575| while (!(i & 1) && try_server < n_servers) # 576| { # 577|-> sockets[send_servers] = grub_net_udp_open (servers[try_server++], # 578| DNS_PORT, # 579| recv_hook, Error: CLANG_WARNING: grub-2.06/grub-core/net/dns.c:697:15: warning[deadcode.DeadStores]: Value stored to 'strtype' during its initialization is never read # 695| { # 696| grub_size_t i; # 697|-> const char *strtype = ""; # 698| # 699| for (i = 0; i < dns_nservers; i++) Error: CLANG_WARNING: grub-2.06/grub-core/net/drivers/efi/efinet.c:856:13: warning[core.NullDereference]: Access to field 'proxy_offer_received' results in a dereference of a null pointer (loaded from variable 'pxe_mode') # 854| struct grub_net_bootp_packet *dhcp_ack = &pxe_mode->dhcp_ack; # 855| # 856|-> if (pxe_mode->proxy_offer_received) # 857| { # 858| grub_dprintf ("efinet", "proxy offer receive"); Error: CLANG_WARNING: grub-2.06/grub-core/net/efi/dhcp.c:379:10: warning[core.NullDereference]: Array access (from variable 'options') results in a null pointer dereference # 377| for (i = 0; i < count; ++i) # 378| { # 379|-> if (options[i]->op_code == grub_cpu_to_be16_compile_time(GRUB_EFI_DHCP6_OPT_DNS_SERVERS)) # 380| { # 381| grub_efi_net_ip_address_t dns; Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/net/efi/dhcp.c: scope_hint: In function ‘grub_cmd_efi_bootp6’ grub-2.06/grub-core/net/efi/dhcp.c:379:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘options’ grub-2.06/grub-core/net/efi/dhcp.c:3: included_from: Included from here. grub-2.06/include/grub/efi/api.h:2149:37: note: in definition of macro ‘efi_call_1’ grub-2.06/grub-core/net/efi/dhcp.c:323:16: note: in expansion of macro ‘efi_call_3’ # 377| for (i = 0; i < count; ++i) # 378| { # 379|-> if (options[i]->op_code == grub_cpu_to_be16_compile_time(GRUB_EFI_DHCP6_OPT_DNS_SERVERS)) # 380| { # 381| grub_efi_net_ip_address_t dns; Error: COMPILER_WARNING: grub-2.06/include/grub/dl.h:25: included_from: Included from here. grub-2.06/include/grub/efi/efi.h:24: included_from: Included from here. grub-2.06/grub-core/net/efi/http.c:3: included_from: Included from here. grub-2.06/grub-core/net/efi/http.c: scope_hint: In function ‘efihttp_request’ grub-2.06/grub-core/net/efi/http.c:242:39: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘long unsigned int’} # 242 | return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ # | | # | grub_efi_status_t {aka long unsigned int} grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/net/efi/http.c:242:75: note: format string is defined here # 242 | return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # | ~^ # | | # | unsigned int # | %lx # 240| { # 241| grub_free (request_data.url); # 242|-> return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # 243| } # 244| Error: COMPILER_WARNING: grub-2.06/grub-core/net/efi/http.c:254:39: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘long unsigned int’} # 254 | return grub_error (GRUB_ERR_IO, "Fail to send a request! status=0x%x\n", status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ # | | # | grub_efi_status_t {aka long unsigned int} grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/net/efi/http.c:254:74: note: format string is defined here # 254 | return grub_error (GRUB_ERR_IO, "Fail to send a request! status=0x%x\n", status); # | ~^ # | | # | unsigned int # | %lx # 252| efi_call_1 (b->close_event, request_token.event); # 253| grub_free (request_data.url); # 254|-> return grub_error (GRUB_ERR_IO, "Fail to send a request! status=0x%x\n", status); # 255| } # 256| /* TODO: Add Timeout */ Error: COMPILER_WARNING: grub-2.06/grub-core/net/efi/http.c:282:39: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘long unsigned int’} # 282 | return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ # | | # | grub_efi_status_t {aka long unsigned int} grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/net/efi/http.c:282:75: note: format string is defined here # 282 | return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # | ~^ # | | # | unsigned int # | %lx # 280| efi_call_1 (b->close_event, request_token.event); # 281| grub_free (request_data.url); # 282|-> return grub_error (GRUB_ERR_IO, "Fail to create an event! status=0x%x\n", status); # 283| } # 284| Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_config_from_device_path’ grub-2.06/grub-core/net/efi/net.c:311:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it grub-2.06/include/grub/net.h:103: included_from: Included from here. grub-2.06/grub-core/net/efi/net.c:1: included_from: Included from here. grub-2.06/grub-core/net/efi/net.c:265:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’ # 309| } # 310| # 311|-> if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp)) # 312| break; # 313| dp = (grub_efi_device_path_t *) ((char *) dp + len); Error: COMPILER_WARNING: grub-2.06/include/grub/net.h:23: included_from: Included from here. grub-2.06/grub-core/net/efi/net.c:1: included_from: Included from here. grub-2.06/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_service_binding’ grub-2.06/grub-core/net/efi/net.c:709:35: warning[-Wformat=]: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘long unsigned int’} # 709 | grub_error (GRUB_ERR_IO, N_("Failed to create child device of http service %x"), status); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/include/grub/err.h:91:68: note: in definition of macro ‘grub_error’ # 91 | #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # | ^~~ grub-2.06/grub-core/net/efi/net.c:709:32: note: in expansion of macro ‘N_’ # 709 | grub_error (GRUB_ERR_IO, N_("Failed to create child device of http service %x"), status); # | ^~ grub-2.06/grub-core/net/efi/net.c:709:83: note: format string is defined here # 709 | grub_error (GRUB_ERR_IO, N_("Failed to create child device of http service %x"), status); # | ~^ # | | # | unsigned int # | %lx # 707| if (status != GRUB_EFI_SUCCESS) # 708| { # 709|-> grub_error (GRUB_ERR_IO, N_("Failed to create child device of http service %x"), status); # 710| return NULL; # 711| } Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_boot_from_https’ grub-2.06/grub-core/net/efi/net.c:1336:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it grub-2.06/grub-core/net/efi/net.c:1323:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’ # 1334| } # 1335| # 1336|-> if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp)) # 1337| break; # 1338| dp = (grub_efi_device_path_t *) ((char *) dp + len); Error: GCC_ANALYZER_WARNING (CWE-465): grub-2.06/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_boot_from_opa’ grub-2.06/grub-core/net/efi/net.c:1369:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it grub-2.06/grub-core/net/efi/net.c:1358:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’ # 1367| } # 1368| # 1369|-> if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp)) # 1370| break; # 1371| dp = (grub_efi_device_path_t *) ((char *) dp + len); Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/net/http.c:19: included_from: Included from here. grub-2.06/grub-core/net/http.c: scope_hint: In function ‘http_establish’ grub-2.06/grub-core/net/http.c:417:48: warning[-Wsign-compare]: operand of ‘?:’ changes signedness from ‘int’ to ‘enum <anonymous>’ due to unsignedness of other operand # 417 | data->filename, server, port ? port : HTTP_PORT); # | ^~~~ grub-2.06/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’ # 46 | #define grub_dprintf(condition, ...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__) # | ^~~~~~~~~~~ # 415| # 416| grub_dprintf ("http", "opening path %s on host %s TCP port %d\n", # 417|-> data->filename, server, port ? port : HTTP_PORT); # 418| data->sock = grub_net_tcp_open (server, # 419| port ? port : HTTP_PORT, http_receive, Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/net/http.c:419:42: warning[-Wsign-compare]: operand of ‘?:’ changes signedness from ‘int’ to ‘enum <anonymous>’ due to unsignedness of other operand # 419 | port ? port : HTTP_PORT, http_receive, # | ^~~~ # 417| data->filename, server, port ? port : HTTP_PORT); # 418| data->sock = grub_net_tcp_open (server, # 419|-> port ? port : HTTP_PORT, http_receive, # 420| http_err, NULL, # 421| file); Error: CLANG_WARNING: grub-2.06/grub-core/net/http.c:450:4: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 448| { # 449| char *str = data->errmsg; # 450|-> err = grub_error (data->err, "%s", str); # 451| grub_free (str); # 452| data->errmsg = 0; Error: CLANG_WARNING: grub-2.06/grub-core/net/icmp6.c:318:2: warning[deadcode.DeadStores]: Value stored to 'nbh' is never read # 316| if (ttl != 0xff) # 317| break; # 318|-> nbh = (struct neighbour_advertise *) nb->data; # 319| err = grub_netbuff_pull (nb, sizeof (*nbh)); # 320| if (err) Error: CLANG_WARNING: grub-2.06/grub-core/net/icmp6.c:542:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 540| if (!nb) # 541| return grub_errno; # 542|-> err = grub_netbuff_reserve (nb, # 543| sizeof (struct neighbour_solicit) # 544| + sizeof (struct option_header) Error: CLANG_WARNING: grub-2.06/grub-core/net/net.c:233:3: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read # 231| ptr += grub_strlen (ptr); # 232| } # 233|-> ptr = grub_stpcpy (ptr, ":slaac"); # 234| # 235| grub_memcpy (&slaac->address, hwaddr, sizeof (slaac->address)); Error: CLANG_WARNING: grub-2.06/grub-core/net/net.c:322:3: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read # 320| ptr += grub_strlen (ptr); # 321| } # 322|-> ptr = grub_stpcpy (ptr, ":link"); # 323| return grub_net_add_addr_real (name, card, &addr, hwaddr, 0); # 324| } Error: CLANG_WARNING: grub-2.06/grub-core/net/net.c:385:6: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 383| err = grub_net_icmp6_send_router_solicit (ifaces[j]); # 384| if (err) # 385|-> err = GRUB_ERR_NONE; # 386| done = 0; # 387| } Error: COMPILER_WARNING: grub-2.06/grub-core/net/net.c:982:39: warning[-Warray-parameter=]: argument 1 of type ‘grub_uint16_t[8]’ {aka ‘short unsigned int[8]’} with mismatched bound # 982 | grub_ipv6_get_masksize (grub_uint16_t be_mask[8]) # | ~~~~~~~~~~~~~~^~~~~~~~~~ grub-2.06/grub-core/net/net.c:19: included_from: Included from here. grub-2.06/include/grub/net.h:560:39: note: previously declared as ‘grub_uint16_t *’ {aka ‘short unsigned int *’} # 560 | grub_ipv6_get_masksize(grub_uint16_t *mask); # | ~~~~~~~~~~~~~~~^~~~ # 980| # 981| int # 982|-> grub_ipv6_get_masksize (grub_uint16_t be_mask[8]) # 983| { # 984| grub_uint8_t *mask; Error: CLANG_WARNING: grub-2.06/grub-core/net/tftp.c:144:19: warning[deadcode.DeadStores]: Value stored to 'tftph' during its initialization is never read # 142| { # 143| grub_file_t file = f; # 144|-> struct tftphdr *tftph = (void *) nb->data; # 145| tftp_data_t data = file->data; # 146| grub_err_t err; Error: CLANG_WARNING: grub-2.06/grub-core/net/tftp.c:175:7: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 173| data->block = 0; # 174| grub_netbuff_free (nb); # 175|-> err = ack (data, 0); # 176| grub_error_save (&data->save_err); # 177| return GRUB_ERR_NONE; Error: CLANG_WARNING: grub-2.06/grub-core/net/tftp.c:349:3: warning[deadcode.DeadStores]: Value stored to 'rrq' is never read # 347| grub_strcpy (rrq, "0"); # 348| rrqlen += grub_strlen ("0") + 1; # 349|-> rrq += grub_strlen ("0") + 1; # 350| hdrlen = sizeof (tftph->opcode) + rrqlen; # 351| Error: COMPILER_WARNING (CWE-704): grub-2.06/grub-core/normal/main.c: scope_hint: In function ‘grub_try_normal_discover’ grub-2.06/grub-core/normal/main.c:408:18: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 406| grub_try_normal_discover (void) # 407| { # 408|-> char *prefix = grub_env_get ("prefix"); # 409| grub_err_t err = GRUB_ERR_FILE_NOT_FOUND; # 410| Error: CLANG_WARNING: grub-2.06/grub-core/normal/menu.c:235:8: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'tail') # 233| entry = (int) grub_strtoul (val, tail, 0); # 234| if (grub_errno == GRUB_ERR_BAD_NUMBER || # 235|-> (*tail && **tail && !grub_isspace(**tail))) # 236| { # 237| entry = -1; Error: CLANG_WARNING: grub-2.06/grub-core/normal/menu_entry.c:775:7: warning[deadcode.DeadStores]: Value stored to 'start' during its initialization is never read # 773| { # 774| struct line *linep; # 775|-> int start = screen->num_lines; # 776| int column = 0; # 777| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/normal/term.c: scope_hint: In function ‘putglyph’ grub-2.06/grub-core/normal/term.c:477:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/include/grub/term.h:73: included_from: Included from here. grub-2.06/grub-core/normal/term.c:19: included_from: Included from here. grub-2.06/include/grub/term.h:326:38: note: in expansion of macro ‘FOR_LIST_ELEMENTS’ grub-2.06/grub-core/normal/term.c:1088:3: note: in expansion of macro ‘FOR_ACTIVE_TERM_OUTPUTS’ grub-2.06/include/grub/term.h:72: included_from: Included from here. grub-2.06/include/grub/unicode.h:23: included_from: Included from here. grub-2.06/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’ grub-2.06/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’ # 475| } # 476| else # 477|-> code = grub_unicode_get_comb (c) [i].code; # 478| # 479| grub_ucs4_to_utf8 (&code, 1, u8, sizeof (u8)); Error: CLANG_WARNING: grub-2.06/grub-core/normal/term.c:964:18: warning[core.NullDereference]: Access to field 'free' results in a dereference of a null pointer (loaded from variable 'state') # 962| grub_free (visual); # 963| else # 964|-> state->free = visual; # 965| } # 966| return ret; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/getroot.c:2: included_from: Included from here. grub-2.06/grub-core/osdep/linux/getroot.c: scope_hint: In function ‘get_btrfs_subvol’ grub-2.06/grub-core/osdep/linux/getroot.c:449:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 447| old = ret; # 448| ret = malloc (len + 1); # 449|-> memcpy (ret, br->name, len); # 450| ret[len] = '\0'; # 451| Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/linux/getroot.c: scope_hint: In function ‘grub_util_get_raid_grub_dev’ grub-2.06/grub-core/osdep/linux/getroot.c:1104:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1102| p = strdup (os_dev + sizeof ("/dev/md_d") - 1); # 1103| # 1104|-> q = strchr (p, 'p'); # 1105| if (q) # 1106| *q = ','; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/linux/getroot.c:1119:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1117| p = strdup (os_dev + sizeof ("/dev/md/d") - 1); # 1118| # 1119|-> q = strchr (p, 'p'); # 1120| if (q) # 1121| *q = ','; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/linux/getroot.c:1132:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1130| p = strdup (os_dev + sizeof ("/dev/md") - 1); # 1131| # 1132|-> q = strchr (p, 'p'); # 1133| if (q) # 1134| *q = ','; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/linux/getroot.c:1145:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1143| p = strdup (os_dev + sizeof ("/dev/md/") - 1); # 1144| # 1145|-> q = strchr (p, 'p'); # 1146| if (q) # 1147| *q = ','; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/linux/getroot.c:1159:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null # 1157| p = strdup (os_dev + sizeof ("/dev/md/") - 1); # 1158| # 1159|-> q = strchr (p, 'p'); # 1160| if (q) # 1161| *q = ','; Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/grub-core/osdep/ofpath.c:2: included_from: Included from here. grub-2.06/grub-core/osdep/linux/ofpath.c: scope_hint: In function ‘strip_trailing_digits’ grub-2.06/grub-core/osdep/linux/ofpath.c:748:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘new’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 746| # 747| new = strdup (p); # 748|-> end = new + strlen(new) - 1; # 749| while (end >= new) # 750| { Error: COMPILER_WARNING: grub-2.06/grub-core/osdep/ofpath.c:2: included_from: Included from here. grub-2.06/grub-core/osdep/linux/ofpath.c: scope_hint: In function ‘get_slave_from_dm’ grub-2.06/grub-core/osdep/linux/ofpath.c:804:7: warning[-Wuse-after-free]: pointer ‘device_path’ may be used after ‘free’ # 804 | grub_util_warn (_("cannot open directory `%s'"), device_path); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-core/osdep/linux/ofpath.c:778:5: note: call to ‘free’ here # 778 | free(device_path); # | ^~~~~~~~~~~~~~~~~ # 802| } # 803| else # 804|-> grub_util_warn (_("cannot open directory `%s'"), device_path); # 805| } # 806| Error: GCC_ANALYZER_WARNING (CWE-775): grub-2.06/grub-core/osdep/password.c:4: included_from: Included from here. grub-2.06/grub-core/osdep/unix/password.c: scope_hint: In function ‘grub_password_get’ grub-2.06/grub-core/osdep/unix/password.c:59:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’ # 57| if (in != stdin) # 58| fclose (in); # 59|-> return 0; # 60| } # 61| ptr = buf + strlen (buf) - 1; Error: GCC_ANALYZER_WARNING (CWE-401): grub-2.06/grub-core/osdep/unix/password.c:59:14: warning[-Wanalyzer-malloc-leak]: leak of ‘in’ # 57| if (in != stdin) # 58| fclose (in); # 59|-> return 0; # 60| } # 61| ptr = buf + strlen (buf) - 1; Error: CLANG_WARNING: grub-2.06/grub-core/osdep/relpath.c:6: included_from: Included from here. grub-2.06/grub-core/osdep/unix/relpath.c:68:3: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 66| #endif # 67| # 68|-> len = strlen (p) + 1; # 69| buf = xstrdup (p); # 70| free (p); Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-core/partmap/acorn.c: scope_hint: In function ‘acorn_partition_map_iterate’ grub-2.06/grub-core/partmap/acorn.c:121:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘map[i].magic’ # 119| for (i = 0; i != LINUX_MAP_ENTRIES; ++i) # 120| { # 121|-> if (map[i].magic != LINUX_NATIVE_MAGIC # 122| && map[i].magic != LINUX_SWAP_MAGIC) # 123| return GRUB_ERR_NONE; Error: CLANG_WARNING: grub-2.06/grub-core/partmap/acorn.c:121:24: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 119| for (i = 0; i != LINUX_MAP_ENTRIES; ++i) # 120| { # 121|-> if (map[i].magic != LINUX_NATIVE_MAGIC # 122| && map[i].magic != LINUX_SWAP_MAGIC) # 123| return GRUB_ERR_NONE; Error: CLANG_WARNING: grub-2.06/grub-core/script/execute.c:789:9: warning[core.NullDereference]: Array access (via field 'args') results in a null pointer dereference # 787| } # 788| # 789|-> if (! result.args[result.argc - 1]) # 790| result.argc--; # 791| Error: CLANG_WARNING: grub-2.06/grub-core/script/lexer.c:219:7: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 217| # 218| line = p; # 219|-> len = len + plen; # 220| } # 221| Error: COMPILER_WARNING (CWE-1164): grub-2.06/grub-core/term/at_keyboard.c: scope_hint: At top level grub-2.06/grub-core/term/at_keyboard.c:87:1: warning[-Wunused-function]: ‘grub_keyboard_controller_write’ defined but not used # 87 | grub_keyboard_controller_write (grub_uint8_t c) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 85| # 86| static void # 87|-> grub_keyboard_controller_write (grub_uint8_t c) # 88| { # 89| at_command (KEYBOARD_COMMAND_WRITE); Error: COMPILER_WARNING (CWE-704): grub-2.06/grub-core/term/at_keyboard.c: scope_hint: In function ‘query_mode’ grub-2.06/grub-core/term/at_keyboard.c:205:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type # 203| * otherwise return 0. # 204| */ # 205|-> envvar = grub_env_get ("at_keyboard_fallback_set"); # 206| if (envvar) { # 207| fallback_set = grub_strtoul (envvar, 0, 10); Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/term/efi/console.c: scope_hint: In function ‘grub_console_putchar’ grub-2.06/grub-core/term/efi/console.c:187:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ grub-2.06/include/grub/term.h:72: included_from: Included from here. grub-2.06/grub-core/term/efi/console.c:19: included_from: Included from here. grub-2.06/include/grub/unicode.h:23: included_from: Included from here. grub-2.06/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’ grub-2.06/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’ # 185| for (i = 0; i < c->ncomb && j + 1 < ARRAY_SIZE (str); i++) # 186| if (c->base < 0xffff) # 187|-> str[j++] = grub_unicode_get_comb (c)[i].code; # 188| str[j] = 0; # 189| Error: CLANG_WARNING: grub-2.06/grub-core/term/efi/serial.c:62:3: warning[deadcode.DeadStores]: Value stored to 'status' is never read # 60| port->broken = 1; # 61| # 62|-> status = efi_call_2 (port->interface->set_control_bits, port->interface, # 63| port->config.rtscts ? 0x4002 : 0x2); # 64| Error: CLANG_WARNING: grub-2.06/grub-core/term/spkmodem.c:58:8: warning[deadcode.DeadStores]: Value stored to 'previous_counter' is never read # 56| if (counter > previous_counter) # 57| { # 58|-> previous_counter = counter; # 59| break; # 60| } Error: CLANG_WARNING: grub-2.06/grub-core/term/tparm.c:520:6: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 518| popcount = number; # 519| for (i = number - 1; i >= 0; i--) # 520|-> npush(param[i]); # 521| } # 522| Error: CLANG_WARNING: grub-2.06/grub-core/term/tparm.c:680:7: warning[core.uninitialized.Assign]: The expression is an uninitialized value. The computed value will also be garbage # 678| case 'i': # 679| if (p_is_s[0] == 0) # 680|-> param[0]++; # 681| if (p_is_s[1] == 0) # 682| param[1]++; Error: CLANG_WARNING: grub-2.06/grub-core/term/tparm.c:682:7: warning[core.uninitialized.Assign]: The expression is an uninitialized value. The computed value will also be garbage # 680| param[0]++; # 681| if (p_is_s[1] == 0) # 682|-> param[1]++; # 683| break; # 684| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/tests/lib/test.c: scope_hint: In function ‘failure_append_vtext’ grub-2.06/grub-core/tests/lib/test.c:85:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘failure’ grub-2.06/grub-core/tests/lib/test.c:19: included_from: Included from here. grub-2.06/grub-core/tests/lib/test.c:55:12: note: in expansion of macro ‘NULL’ # 83| { # 84| char *msg = grub_xvasprintf(fmt, args); # 85|-> if (failure->message) # 86| { # 87| char *oldmsg = failure->message; Error: CLANG_WARNING: grub-2.06/grub-core/video/bochs.c:377:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 375| # 376| if (BOCHS_APERTURE_SIZE >= 2 * page_size) # 377|-> err = grub_video_fb_setup (mode_type, mode_mask, # 378| &framebuffer.mode_info, # 379| framebuffer.ptr, Error: CLANG_WARNING: grub-2.06/grub-core/video/bochs.c:383:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 381| framebuffer.ptr + page_size); # 382| else # 383|-> err = grub_video_fb_setup (mode_type, mode_mask, # 384| &framebuffer.mode_info, # 385| framebuffer.ptr, 0, 0); Error: CLANG_WARNING: grub-2.06/grub-core/video/cirrus.c:458:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 456| # 457| if (CIRRUS_APERTURE_SIZE >= 2 * framebuffer.page_size) # 458|-> err = grub_video_fb_setup (mode_type, mode_mask, # 459| &framebuffer.mode_info, # 460| framebuffer.ptr, Error: CLANG_WARNING: grub-2.06/grub-core/video/cirrus.c:464:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 462| framebuffer.ptr + framebuffer.page_size); # 463| else # 464|-> err = grub_video_fb_setup (mode_type, mode_mask, # 465| &framebuffer.mode_info, # 466| framebuffer.ptr, 0, 0); Error: CLANG_WARNING: grub-2.06/grub-core/video/fb/fbblit.c:1362:15: warning[deadcode.DeadStores]: Value stored to 'color' is never read # 1360| { # 1361| /* General pixel color blending. */ # 1362|-> color = *dstptr; # 1363| # 1364| #ifndef GRUB_CPU_WORDS_BIGENDIAN Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vbe.c:691:4: warning[deadcode.DeadStores]: Value stored to 'status' is never read # 689| } # 690| # 691|-> status = grub_vbe_bios_set_palette_data (GRUB_VIDEO_FBSTD_NUMCOLORS, # 692| 0, palette); # 693| Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vbe.c:865:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 863| mode_info->mode_number = mode; # 864| # 865|-> mode_info->width = vbeinfo->x_resolution; # 866| mode_info->height = vbeinfo->y_resolution; # 867| mode_info->mode_type = 0; Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vbe.c:1022:42: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value # 1020| } # 1021| # 1022|-> if ((vbe_mode_info.mode_attributes & GRUB_VBE_MODEATTR_SUPPORTED) == 0) # 1023| /* If not available, skip it. */ # 1024| continue; Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vbe.c:1126:4: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1124| # 1125| if (vram_size >= 2 * page_size) # 1126|-> err = grub_video_fb_setup (mode_type, mode_mask, # 1127| &framebuffer.mode_info, # 1128| framebuffer.ptr, Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vbe.c:1132:4: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 1130| framebuffer.ptr + page_size); # 1131| else # 1132|-> err = grub_video_fb_setup (mode_type, mode_mask, # 1133| &framebuffer.mode_info, # 1134| framebuffer.ptr, 0, 0); Error: CLANG_WARNING: grub-2.06/grub-core/video/i386/pc/vga.c:189:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read # 187| return err; # 188| # 189|-> err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS, # 190| grub_video_fbstd_colors); # 191| Error: COMPILER_WARNING: grub-2.06/include/grub/compiler-rt-emu.h:23: included_from: Included from here. grub-2.06/grub-emu-2.06/grub-core/symlist.h:20: included_from: Included from here. grub-2.06/grub-emu-2.06/config-util.h:1177:10: warning: "_GL_INLINE_HEADER_BEGIN" redefined # 1177 | # define _GL_INLINE_HEADER_BEGIN # | ^~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/grub-core/symlist.h:1: included_from: Included from here. grub-2.06/grub-emu-2.06/config.h:130:13: note: this is the location of the previous definition # 130 | # define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push") \ # | ^~~~~~~~~~~~~~~~~~~~~~~ # 1175| _Pragma ("GCC diagnostic pop") # 1176| #else # 1177|-> # define _GL_INLINE_HEADER_BEGIN # 1178| # define _GL_INLINE_HEADER_END # 1179| #endif Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1178:10: warning: "_GL_INLINE_HEADER_END" redefined # 1178 | # define _GL_INLINE_HEADER_END # | ^~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:133:13: note: this is the location of the previous definition # 133 | # define _GL_INLINE_HEADER_END _Pragma ("GCC diagnostic pop") # | ^~~~~~~~~~~~~~~~~~~~~ # 1176| #else # 1177| # define _GL_INLINE_HEADER_BEGIN # 1178|-> # define _GL_INLINE_HEADER_END # 1179| #endif # 1180| Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1544:10: warning: "_GL_GNUC_PREREQ" redefined # 1544 | # define _GL_GNUC_PREREQ(major, minor) \ # | ^~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:106:13: note: this is the location of the previous definition # 106 | # define _GL_GNUC_PREREQ GNUC_PREREQ # | ^~~~~~~~~~~~~~~ # 1542| /* True if the compiler says it groks GNU C version MAJOR.MINOR. */ # 1543| #if defined __GNUC__ && defined __GNUC_MINOR__ # 1544|-> # define _GL_GNUC_PREREQ(major, minor) \ # 1545| ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) # 1546| #else Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1730:11: warning: "_GL_ATTRIBUTE_COLD" redefined # 1730 | # define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) # | ^~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:81:13: note: this is the location of the previous definition # 81 | # define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) # | ^~~~~~~~~~~~~~~~~~ # 1728| #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ # 1729| # ifndef __SUNPRO_C # 1730|-> # define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) # 1731| # else # 1732| # define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1746:10: warning: "_GL_ATTRIBUTE_CONST" redefined # 1746 | # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) # | ^~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:82:13: note: this is the location of the previous definition # 82 | # define _GL_ATTRIBUTE_CONST __attribute__ ((const)) # | ^~~~~~~~~~~~~~~~~~~ # 1744| /* Applies to: functions. */ # 1745| #if _GL_HAS_ATTRIBUTE (const) # 1746|-> # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) # 1747| #else # 1748| # define _GL_ATTRIBUTE_CONST Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1758:10: warning: "_GL_ATTRIBUTE_DEALLOC" redefined # 1758 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) # | ^~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:83:13: note: this is the location of the previous definition # 83 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i))) # | ^~~~~~~~~~~~~~~~~~~~~ # 1756| /* Applies to: functions. Cannot be used on inline functions. */ # 1757| #if _GL_GNUC_PREREQ (11, 0) # 1758|-> # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) # 1759| #else # 1760| # define _GL_ATTRIBUTE_DEALLOC(f, i) Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1778:10: warning: "_GL_ATTRIBUTE_DEPRECATED" redefined # 1778 | # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] # | ^~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:85:13: note: this is the location of the previous definition # 85 | # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) # | ^~~~~~~~~~~~~~~~~~~~~~~~ # 1776| in C++ also: namespace, class, template specialization. */ # 1777| #if _GL_HAS_C_ATTRIBUTE (deprecated) # 1778|-> # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] # 1779| #elif _GL_HAS_ATTRIBUTE (deprecated) # 1780| # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1816:10: warning: "_GL_ATTRIBUTE_FALLTHROUGH" redefined # 1816 | # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] # | ^~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:113:15: note: this is the location of the previous definition # 113 | # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough)) # | ^~~~~~~~~~~~~~~~~~~~~~~~~ # 1814| /* Always expands to something. */ # 1815| #if _GL_HAS_C_ATTRIBUTE (fallthrough) # 1816|-> # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] # 1817| #elif _GL_HAS_ATTRIBUTE (fallthrough) # 1818| # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1855:10: warning: "_GL_ATTRIBUTE_MALLOC" redefined # 1855 | # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # | ^~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:91:13: note: this is the location of the previous definition # 91 | # define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc)) # | ^~~~~~~~~~~~~~~~~~~~ # 1853| /* Applies to: functions. */ # 1854| #if _GL_HAS_ATTRIBUTE (malloc) # 1855|-> # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # 1856| #else # 1857| # define _GL_ATTRIBUTE_MALLOC Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1884:10: warning: "_GL_ATTRIBUTE_MAYBE_UNUSED" redefined # 1884 | # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:92:13: note: this is the location of the previous definition # 92 | # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1882| clang supports both syntaxes. */ # 1883| #if _GL_HAS_C_ATTRIBUTE (maybe_unused) # 1884|-> # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] # 1885| #else # 1886| # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED Error: COMPILER_WARNING: grub-2.06/grub-emu-2.06/config-util.h:1898:10: warning: "_GL_ATTRIBUTE_NODISCARD" redefined # 1898 | # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] # | ^~~~~~~~~~~~~~~~~~~~~~~ grub-2.06/grub-emu-2.06/config.h:94:13: note: this is the location of the previous definition # 94 | # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) # | ^~~~~~~~~~~~~~~~~~~~~~~ # 1896| /* Applies to: function, enumeration, class. */ # 1897| #if _GL_HAS_C_ATTRIBUTE (nodiscard) # 1898|-> # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] # 1899| #elif _GL_HAS_ATTRIBUTE (warn_unused_result) # 1900| # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-emu-2.06/grub-core/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-emu-2.06/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-emu-2.06/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-emu-2.06/grub-core/grub_script.yy.c:52: included_from: Included from here. grub-2.06/grub-emu-2.06/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.yy.c:52: included_from: Included from here. grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’ grub-2.06/grub-i386-efi-2.06/grub-core/grub_script.yy.c:2132:12: note: in expansion of macro ‘YY_CURRENT_BUFFER’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.yy.c:52: included_from: Included from here. grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’ grub-2.06/grub-i386-pc-2.06/grub-core/grub_script.yy.c:2132:12: note: in expansion of macro ‘YY_CURRENT_BUFFER’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-pc-2.06/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-i386-pc-2.06/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-i386-pc-2.06/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-i386-pc-2.06/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-i386-pc-2.06/grub_script.yy.c:2132:12: note: in expansion of macro ‘YY_CURRENT_BUFFER’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.yy.c:52: included_from: Included from here. grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’ grub-2.06/grub-x86_64-efi-2.06/grub-core/grub_script.yy.c:2132:12: note: in expansion of macro ‘YY_CURRENT_BUFFER’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’ grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’ # 494| # if defined __GNUC__ && 1 < __GNUC__ # 495| # define YYCOPY(Dst, Src, Count) \ # 496|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # 497| # else # 498| # define YYCOPY(Dst, Src, Count) \ Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/grub-x86_64-efi-2.06/grub_script.tab.c:1238:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ # 1236| unconditionally makes the parser a bit smaller, and it avoids a # 1237| GCC warning that YYVAL may be used uninitialized. */ # 1238|-> yyval = yyvsp[1-yylen]; # 1239| # 1240| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-x86_64-efi-2.06/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’ grub-2.06/grub-x86_64-efi-2.06/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’ grub-2.06/grub-x86_64-efi-2.06/grub_script.yy.c:2132:12: note: in expansion of macro ‘YY_CURRENT_BUFFER’ # 2089| # 2090| yy_flush_buffer( b , yyscanner); # 2091|-> # 2092| b->yy_input_file = file; # 2093| b->yy_fill_buffer = 1; Error: CLANG_WARNING: grub-2.06/grub-core/fs/zfs/zfscrypt.c:28: included_from: Included from here. grub-2.06/include/grub/zfs/zfs.h:27: included_from: Included from here. grub-2.06/include/grub/crypto.h:287:25: warning[core.UndefinedBinaryOperatorResult]: The right operand of '^' is a garbage value # 285| || ((grub_addr_t) outptr & (sizeof (grub_uint64_t) - 1)))) # 286| { # 287|-> *outptr = *in1ptr ^ *in2ptr; # 288| in1ptr++; # 289| in2ptr++; Error: CLANG_WARNING: grub-2.06/include/grub/crypto.h:298:5: warning[core.UndefinedBinaryOperatorResult]: The right operand of '^' is a garbage value # 296| *(grub_uint64_t *) (void *) outptr # 297| = (*(const grub_uint64_t *) (const void *) in1ptr # 298|-> ^ *(const grub_uint64_t *) (const void *) in2ptr); # 299| in1ptr += sizeof (grub_uint64_t); # 300| in2ptr += sizeof (grub_uint64_t); Error: GCC_ANALYZER_WARNING (CWE-121): grub-2.06/grub-core/net/bootp.c:27: included_from: Included from here. grub-2.06/include/grub/datetime.h: scope_hint: In function ‘grub_datetime2unixtime’ grub-2.06/include/grub/datetime.h:122:8: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow grub-2.06/grub-core/net/bootp.c:19: included_from: Included from here. grub-2.06/include/grub/net.h:389:55: note: in definition of macro ‘FOR_NET_CARDS’ grub-2.06/include/grub/datetime.h:122:8: note: write of 4 bytes to beyond the end of ‘t’ # 120| || (datetime->year < 1960 && ret > 0)) # 121| return 0; # 122|-> *nix = ret; # 123| return 1; # 124| } Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_efi_get_media_file_path’ grub-2.06/include/grub/efi/api.h:691:54: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dp’ grub-2.06/grub-core/loader/efi/chainloader.c:523:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’ grub-2.06/grub-core/loader/efi/chainloader.c:532:12: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/include/grub/efi/api.h:694:66: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_LENGTH’ grub-2.06/include/grub/efi/api.h:709:4: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_VALID’ grub-2.06/grub-core/loader/efi/chainloader.c:532:12: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:532:12: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’ grub-2.06/grub-core/loader/efi/chainloader.c:523:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’ # 689| typedef struct grub_efi_device_path grub_efi_device_path_protocol_t; # 690| # 691|-> #define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f) # 692| #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype) # 693| #define GRUB_EFI_DEVICE_PATH_LENGTH(dp) ((dp)->length) Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/include/grub/disk.h:25: included_from: Included from here. grub-2.06/include/grub/err.h:91:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*d.idx’ grub-2.06/grub-core/disk/luks2.c:311:12: note: in expansion of macro ‘grub_error’ grub-2.06/grub-core/disk/luks2.c:563:30: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/grub-core/disk/luks2.c:569:25: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/grub-core/disk/luks2.c:573:38: note: in expansion of macro ‘grub_be_to_cpu64’ grub-2.06/grub-core/disk/luks2.c:311:12: note: in expansion of macro ‘grub_error’ grub-2.06/grub-core/disk/luks2.c:311:12: note: in expansion of macro ‘grub_error’ # 89| __attribute__ ((format (GNU_PRINTF, 4, 5))); # 90| # 91|-> #define grub_error(n, fmt, ...) grub_error (n, __FILE__, __LINE__, fmt, ##__VA_ARGS__) # 92| # 93| Error: GCC_ANALYZER_WARNING (CWE-457): grub-2.06/include/grub/disk.h:31: included_from: Included from here. grub-2.06/include/grub/file.h:26: included_from: Included from here. grub-2.06/include/grub/loader.h:23: included_from: Included from here. grub-2.06/grub-core/loader/i386/bsdXX.c:1: included_from: Included from here. grub-2.06/grub-core/loader/i386/bsd32.c:6: included_from: Included from here. grub-2.06/grub-core/loader/i386/bsdXX.c: scope_hint: In function ‘grub_freebsd_load_elf_meta32’ grub-2.06/include/grub/misc.h:31:44: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘symend’ grub-2.06/grub-core/loader/i386/bsdXX.c:9:25: note: in expansion of macro ‘ALIGN_UP’ grub-2.06/grub-core/loader/i386/bsdXX.c:417:15: note: in expansion of macro ‘ALIGN_PAGE’ grub-2.06/include/grub/file.h:23: included_from: Included from here. grub-2.06/grub-core/loader/i386/bsdXX.c:317:13: note: in expansion of macro ‘grub_error’ grub-2.06/grub-core/loader/i386/bsdXX.c:9:25: note: in expansion of macro ‘ALIGN_UP’ grub-2.06/grub-core/loader/i386/bsdXX.c:417:15: note: in expansion of macro ‘ALIGN_PAGE’ grub-2.06/grub-core/loader/i386/bsdXX.c:9:25: note: in expansion of macro ‘ALIGN_UP’ grub-2.06/grub-core/loader/i386/bsdXX.c:417:15: note: in expansion of macro ‘ALIGN_PAGE’ # 29| # 30| #define ALIGN_UP(addr, align) \ # 31|-> (((addr) + (typeof (addr)) (align) - 1) & ~((typeof (addr)) (align) - 1)) # 32| #define ALIGN_UP_OVERHEAD(addr, align) ((-(addr)) & ((typeof (addr)) (align) - 1)) # 33| #define ALIGN_DOWN(addr, align) \ Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/grub-core/commands/nativedisk.c:20: included_from: Included from here. grub-2.06/include/grub/misc.h: scope_hint: In function ‘grub_strcasecmp’ grub-2.06/include/grub/misc.h:221:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s1’ grub-2.06/grub-core/commands/nativedisk.c:148:3: note: in expansion of macro ‘grub_dprintf’ grub-2.06/grub-core/commands/nativedisk.c:148:3: note: in expansion of macro ‘grub_dprintf’ # 219| grub_strcasecmp (const char *s1, const char *s2) # 220| { # 221|-> while (*s1 && *s2) # 222| { # 223| if (grub_tolower ((grub_uint8_t) *s1) Error: COMPILER_WARNING (CWE-195): grub-2.06/include/grub/disk.h:31: included_from: Included from here. grub-2.06/include/grub/file.h:26: included_from: Included from here. grub-2.06/include/grub/loader.h:23: included_from: Included from here. grub-2.06/grub-core/loader/i386/pc/truecrypt.c:20: included_from: Included from here. grub-2.06/grub-core/loader/i386/pc/truecrypt.c: scope_hint: In function ‘grub_cmd_truecrypt’ grub-2.06/include/grub/misc.h:513:9: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘grub_uint64_t’ {aka ‘long long unsigned int’} # 513 | _a < _b ? _a : _b; }) # | ^ grub-2.06/include/grub/misc.h:34:11: note: in definition of macro ‘ALIGN_DOWN’ # 34 | ((addr) & ~((typeof (addr)) (align) - 1)) # | ^~~~ grub-2.06/include/grub/misc.h:514:24: note: in expansion of macro ‘_grub_min’ # 514 | #define grub_min(a, b) _grub_min(a, b, \ # | ^~~~~~~~~ grub-2.06/grub-core/loader/i386/pc/truecrypt.c:179:26: note: in expansion of macro ‘grub_min’ # 179 | destaddr = ALIGN_DOWN (grub_min (0x90000, grub_mmap_get_lower ()) # | ^~~~~~~~ # 511| ({ typeof (a) _a = (a); \ # 512| typeof (b) _b = (b); \ # 513|-> _a < _b ? _a : _b; }) # 514| #define grub_min(a, b) _grub_min(a, b, \ # 515| CONCAT(_a_,__COUNTER__), \ Error: COMPILER_WARNING (CWE-195): grub-2.06/include/grub/misc.h:515:41: warning[-Wsign-compare]: operand of ‘?:’ changes signedness from ‘int’ to ‘grub_uint64_t’ {aka ‘long long unsigned int’} due to unsignedness of other operand # 515 | CONCAT(_a_,__COUNTER__), \ # | ^~~ grub-2.06/include/grub/misc.h:34:11: note: in definition of macro ‘ALIGN_DOWN’ # 34 | ((addr) & ~((typeof (addr)) (align) - 1)) # | ^~~~ grub-2.06/include/grub/misc.h:514:24: note: in expansion of macro ‘_grub_min’ # 514 | #define grub_min(a, b) _grub_min(a, b, \ # | ^~~~~~~~~ grub-2.06/include/grub/misc.h:43:22: note: in expansion of macro ‘CONCAT_’ # 43 | #define CONCAT(a, b) CONCAT_(a, b) # | ^~~~~~~ grub-2.06/include/grub/misc.h:515:34: note: in expansion of macro ‘CONCAT’ # 515 | CONCAT(_a_,__COUNTER__), \ # | ^~~~~~ grub-2.06/grub-core/loader/i386/pc/truecrypt.c:179:26: note: in expansion of macro ‘grub_min’ # 179 | destaddr = ALIGN_DOWN (grub_min (0x90000, grub_mmap_get_lower ()) # | ^~~~~~~~ # 513| _a < _b ? _a : _b; }) # 514| #define grub_min(a, b) _grub_min(a, b, \ # 515|-> CONCAT(_a_,__COUNTER__), \ # 516| CONCAT(_b_,__COUNTER__)) # 517| Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/kern/mm.c:66: included_from: Included from here. grub-2.06/grub-core/kern/mm.c: scope_hint: In function ‘grub_memalign’ grub-2.06/include/grub/misc.h:521:9: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘grub_size_t’ {aka ‘long unsigned int’} and ‘int’ # 521 | _a > _b ? _a : _b; }) # | ^ grub-2.06/include/grub/misc.h:522:24: note: in expansion of macro ‘_grub_max’ # 522 | #define grub_max(a, b) _grub_max(a, b, \ # | ^~~~~~~~~ grub-2.06/grub-core/kern/mm.c:508:14: note: in expansion of macro ‘grub_max’ # 508 | grow = grub_max (grow, GRUB_MM_HEAP_GROW_EXTRA); # | ^~~~~~~~ # 519| ({ typeof (a) _a = (a); \ # 520| typeof (b) _b = (b); \ # 521|-> _a > _b ? _a : _b; }) # 522| #define grub_max(a, b) _grub_max(a, b, \ # 523| CONCAT(_a_,__COUNTER__), \ Error: COMPILER_WARNING (CWE-195): grub-2.06/grub-core/kern/mm.c:66: included_from: Included from here. grub-2.06/grub-core/kern/mm.c: scope_hint: In function ‘grub_memalign’ grub-2.06/include/grub/misc.h:521:9: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘grub_size_t’ {aka ‘unsigned int’} and ‘int’ # 521 | _a > _b ? _a : _b; }) # | ^ grub-2.06/include/grub/misc.h:522:24: note: in expansion of macro ‘_grub_max’ # 522 | #define grub_max(a, b) _grub_max(a, b, \ # | ^~~~~~~~~ grub-2.06/grub-core/kern/mm.c:508:14: note: in expansion of macro ‘grub_max’ # 508 | grow = grub_max (grow, GRUB_MM_HEAP_GROW_EXTRA); # | ^~~~~~~~ # 519| ({ typeof (a) _a = (a); \ # 520| typeof (b) _b = (b); \ # 521|-> _a > _b ? _a : _b; }) # 522| #define grub_max(a, b) _grub_max(a, b, \ # 523| CONCAT(_a_,__COUNTER__), \ Error: COMPILER_WARNING (CWE-195): grub-2.06/include/grub/misc.h:524:41: warning[-Wsign-compare]: operand of ‘?:’ changes signedness from ‘int’ to ‘grub_size_t’ {aka ‘long unsigned int’} due to unsignedness of other operand # 524 | CONCAT(_b_,__COUNTER__)) # | ^~~ grub-2.06/include/grub/misc.h:521:21: note: in definition of macro ‘_grub_max’ # 521 | _a > _b ? _a : _b; }) # | ^~ grub-2.06/include/grub/misc.h:43:22: note: in expansion of macro ‘CONCAT_’ # 43 | #define CONCAT(a, b) CONCAT_(a, b) # | ^~~~~~~ grub-2.06/include/grub/misc.h:524:34: note: in expansion of macro ‘CONCAT’ # 524 | CONCAT(_b_,__COUNTER__)) # | ^~~~~~ grub-2.06/grub-core/kern/mm.c:508:14: note: in expansion of macro ‘grub_max’ # 508 | grow = grub_max (grow, GRUB_MM_HEAP_GROW_EXTRA); # | ^~~~~~~~ # 522| #define grub_max(a, b) _grub_max(a, b, \ # 523| CONCAT(_a_,__COUNTER__), \ # 524|-> CONCAT(_b_,__COUNTER__)) # 525| # 526| #define grub_log2ull(n) (GRUB_TYPE_BITS (grub_uint64_t) - __builtin_clzll (n) - 1) Error: COMPILER_WARNING (CWE-195): grub-2.06/include/grub/misc.h:524:41: warning[-Wsign-compare]: operand of ‘?:’ changes signedness from ‘int’ to ‘grub_size_t’ {aka ‘unsigned int’} due to unsignedness of other operand # 524 | CONCAT(_b_,__COUNTER__)) # | ^~~ grub-2.06/include/grub/misc.h:521:21: note: in definition of macro ‘_grub_max’ # 521 | _a > _b ? _a : _b; }) # | ^~ grub-2.06/include/grub/misc.h:43:22: note: in expansion of macro ‘CONCAT_’ # 43 | #define CONCAT(a, b) CONCAT_(a, b) # | ^~~~~~~ grub-2.06/include/grub/misc.h:524:34: note: in expansion of macro ‘CONCAT’ # 524 | CONCAT(_b_,__COUNTER__)) # | ^~~~~~ grub-2.06/grub-core/kern/mm.c:508:14: note: in expansion of macro ‘grub_max’ # 508 | grow = grub_max (grow, GRUB_MM_HEAP_GROW_EXTRA); # | ^~~~~~~~ # 522| #define grub_max(a, b) _grub_max(a, b, \ # 523| CONCAT(_a_,__COUNTER__), \ # 524|-> CONCAT(_b_,__COUNTER__)) # 525| # 526| #define grub_log2ull(n) (GRUB_TYPE_BITS (grub_uint64_t) - __builtin_clzll (n) - 1) Error: GCC_ANALYZER_WARNING (CWE-688): grub-2.06/include/grub/osdep/hostfile.h:6: included_from: Included from here. grub-2.06/include/grub/emu/hostfile.h:26: included_from: Included from here. grub-2.06/include/grub/util/install.h:27: included_from: Included from here. grub-2.06/util/grub-install-common.c:36: included_from: Included from here. grub-2.06/include/grub/osdep/hostfile_unix.h: scope_hint: In function ‘grub_util_fd_readdir’ grub-2.06/include/grub/osdep/hostfile_unix.h:53:10: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dirp’ where non-null expected /usr/include/features.h:511: included_from: Included from here. /usr/include/bits/libc-header-start.h:33: included_from: Included from here. /usr/include/stdio.h:28: included_from: Included from here. grub-2.06/grub-x86_64-efi-2.06/grub-core/lib/gnulib/stdio.h:43: included_from: Included from here. grub-2.06/include/grub/emu/misc.h:25: included_from: Included from here. grub-2.06/util/grub-install-common.c:21: included_from: Included from here. /usr/include/dirent.h:167:23: note: argument 1 of ‘readdir’ must be non-null # 51| grub_util_fd_readdir (grub_util_fd_dir_t dirp) # 52| { # 53|-> return readdir (dirp); # 54| } # 55| Error: GCC_ANALYZER_WARNING (CWE-476): grub-2.06/util/grub-fstest.c: scope_hint: In function ‘fstest’ grub-2.06/util/grub-fstest.c:394:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 392| grub_util_error ("%s", grub_errmsg); # 393| # 394|-> host_file = grub_xasprintf ("(host)%s", images[i]); # 395| if (!host_file) # 396| grub_util_error ("%s", grub_errmsg); Error: CLANG_WARNING: grub-2.06/util/grub-fstest.c:394:47: warning[core.NullDereference]: Array access (from variable 'images') results in a null pointer dereference # 392| grub_util_error ("%s", grub_errmsg); # 393| # 394|-> host_file = grub_xasprintf ("(host)%s", images[i]); # 395| if (!host_file) # 396| grub_util_error ("%s", grub_errmsg); Error: CLANG_WARNING: grub-2.06/util/grub-gen-asciih.c:99:12: warning[deadcode.DeadStores]: Although the value stored to 'cutbottom' is used in the enclosing expression, the value is never actually read from 'cutbottom' # 97| printf ("%x\n", char_code); # 98| # 99|-> cuttop = cutbottom = cutleft = cutright = 0; # 100| # 101| width = glyph->bitmap.width; Error: CLANG_WARNING: grub-2.06/util/grub-gen-asciih.c:99:34: warning[deadcode.DeadStores]: Although the value stored to 'cutright' is used in the enclosing expression, the value is never actually read from 'cutright' # 97| printf ("%x\n", char_code); # 98| # 99|-> cuttop = cutbottom = cutleft = cutright = 0; # 100| # 101| width = glyph->bitmap.width; Error: COMPILER_WARNING (CWE-195): grub-2.06/util/grub-install-common.c: scope_hint: In function ‘grub_install_is_short_mbrgap_supported’ grub-2.06/util/grub-install-common.c:377:17: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} # 377 | for (i = 0; i < modules.n_entries; i++) { # | ^ # 375| }; # 376| # 377|-> for (i = 0; i < modules.n_entries; i++) { # 378| for (j = 0; j < ARRAY_SIZE (whitelist); j++) # 379| if (strcmp(modules.entries[i], whitelist[j]) == 0) Error: COMPILER_WARNING (CWE-195): grub-2.06/util/grub-install-common.c:378:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ # 378 | for (j = 0; j < ARRAY_SIZE (whitelist); j++) # | ^ # 376| # 377| for (i = 0; i < modules.n_entries; i++) { # 378|-> for (j = 0; j < ARRAY_SIZE (whitelist); j++) # 379| if (strcmp(modules.entries[i], whitelist[j]) == 0) # 380| break; Error: CLANG_WARNING: grub-2.06/util/grub-install.c:1431:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1429| fclose (flf); # 1430| relfl = grub_make_system_path_relative_to_its_root (fl); # 1431|-> fprintf (load_cfg_f, "search.file %s root ", # 1432| relfl); # 1433| grub_install_push_module ("search_fs_file"); Error: CLANG_WARNING: grub-2.06/util/grub-install.c:1453:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1451| dev->disk->name, # 1452| dev); # 1453|-> fprintf (load_cfg_f, " "); # 1454| if (dev != grub_dev) # 1455| grub_device_close (dev); Error: CLANG_WARNING: grub-2.06/util/grub-install.c:1464:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1462| { # 1463| grub_util_fprint_full_disk_name (load_cfg_f, map, dev); # 1464|-> fprintf (load_cfg_f, " "); # 1465| } # 1466| Error: CLANG_WARNING: grub-2.06/util/grub-install.c:1518:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1516| { # 1517| grub_util_fprint_full_disk_name (load_cfg_f, g, dev); # 1518|-> fprintf (load_cfg_f, " "); # 1519| free (g); # 1520| } Error: CLANG_WARNING: grub-2.06/util/grub-install.c:1524:4: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1522| grub_device_close (dev); # 1523| } # 1524|-> fprintf (load_cfg_f, "\n"); # 1525| char *escaped_relpath = escape (relative_grubdir); # 1526| fprintf (load_cfg_f, "set prefix=($root)'%s'\n", Error: CLANG_WARNING: grub-2.06/util/grub-mkimage32.c:25: included_from: Included from here. grub-2.06/util/grub-mkimagexx.c:573:2: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read # 571| memcpy (ptr, ".xen", sizeof (".xen")); # 572| shdr->sh_name = grub_host_to_target32 (ptr - str_start); # 573|-> ptr += sizeof (".xen"); # 574| shdr->sh_type = grub_host_to_target32 (SHT_PROGBITS); # 575| shdr->sh_addr = grub_host_to_target_addr (target_addr + layout->kernel_size); Error: COMPILER_WARNING (CWE-195): grub-2.06/util/grub-mount.c: scope_hint: In function ‘fuse_read’ grub-2.06/util/grub-mount.c:264:11: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘off_t’ {aka ‘long int’} and ‘grub_off_t’ {aka ‘long unsigned int’} # 264 | if (off > file->size) # | ^ # 262| grub_ssize_t size; # 263| # 264|-> if (off > file->size) # 265| return -EINVAL; # 266| Error: CLANG_WARNING: grub-2.06/util/grub-mount.c:566:24: warning[core.NullDereference]: Array access (from variable 'fuse_args') results in a null pointer dereference # 564| # 565| fuse_args = xrealloc (fuse_args, (fuse_argc + 2) * sizeof (fuse_args[0])); # 566|-> fuse_args[fuse_argc] = xstrdup (argv[0]); # 567| fuse_argc++; # 568| /* Run single-threaded. */ Error: CLANG_WARNING: grub-2.06/util/mkimage.c:1139:7: warning[deadcode.DeadStores]: Value stored to 'offset' is never read # 1137| # 1138| grub_strcpy (kernel_img + offset, prefix); # 1139|-> offset += prefix_size; # 1140| } # 1141| Error: COMPILER_WARNING: grub-2.06/util/mkimage.c: scope_hint: In function ‘grub_install_generate_image’ grub-2.06/util/mkimage.c:1421:49: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1421 | PE_OHDR (o32, o64, dll_characteristics) = grub_host_to_target16 (GRUB_PE32_NX_COMPAT); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1421:9: note: in expansion of macro ‘PE_OHDR’ # 1421 | PE_OHDR (o32, o64, dll_characteristics) = grub_host_to_target16 (GRUB_PE32_NX_COMPAT); # | ^~~~~~~ # 1419| } # 1420| # 1421|-> PE_OHDR (o32, o64, dll_characteristics) = grub_host_to_target16 (GRUB_PE32_NX_COMPAT); # 1422| PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); # 1423| PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1422:41: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1422 | PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1422:9: note: in expansion of macro ‘PE_OHDR’ # 1422 | PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); # | ^~~~~~~ # 1420| # 1421| PE_OHDR (o32, o64, dll_characteristics) = grub_host_to_target16 (GRUB_PE32_NX_COMPAT); # 1422|-> PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); # 1423| PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); # 1424| PE_OHDR (o32, o64, image_base) = 0; Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1423:40: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1423 | PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1423:9: note: in expansion of macro ‘PE_OHDR’ # 1423 | PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); # | ^~~~~~~ # 1421| PE_OHDR (o32, o64, dll_characteristics) = grub_host_to_target16 (GRUB_PE32_NX_COMPAT); # 1422| PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); # 1423|-> PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); # 1424| PE_OHDR (o32, o64, image_base) = 0; # 1425| PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1424:40: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1424 | PE_OHDR (o32, o64, image_base) = 0; # | ^ grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1424:9: note: in expansion of macro ‘PE_OHDR’ # 1424 | PE_OHDR (o32, o64, image_base) = 0; # | ^~~~~~~ # 1422| PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); # 1423| PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); # 1424|-> PE_OHDR (o32, o64, image_base) = 0; # 1425| PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); # 1426| PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1425:40: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1425 | PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1425:9: note: in expansion of macro ‘PE_OHDR’ # 1425 | PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); # | ^~~~~~~ # 1423| PE_OHDR (o32, o64, entry_addr) = grub_host_to_target32 (layout.start_address); # 1424| PE_OHDR (o32, o64, image_base) = 0; # 1425|-> PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); # 1426| PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); # 1427| PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1426:47: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1426 | PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1426:9: note: in expansion of macro ‘PE_OHDR’ # 1426 | PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); # | ^~~~~~~ # 1424| PE_OHDR (o32, o64, image_base) = 0; # 1425| PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); # 1426|-> PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); # 1427| PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); # 1428| PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1427:44: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1427 | PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1427:9: note: in expansion of macro ‘PE_OHDR’ # 1427 | PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); # | ^~~~~~~ # 1425| PE_OHDR (o32, o64, image_size) = grub_host_to_target32 (pe_size); # 1426| PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); # 1427|-> PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); # 1428| PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION); # 1429| Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1428:39: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1428 | PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1428:9: note: in expansion of macro ‘PE_OHDR’ # 1428 | PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION); # | ^~~~~~~ # 1426| PE_OHDR (o32, o64, section_alignment) = grub_host_to_target32 (image_target->section_align); # 1427| PE_OHDR (o32, o64, file_alignment) = grub_host_to_target32 (GRUB_PE32_FILE_ALIGNMENT); # 1428|-> PE_OHDR (o32, o64, subsystem) = grub_host_to_target16 (GRUB_PE32_SUBSYSTEM_EFI_APPLICATION); # 1429| # 1430| /* Do these really matter? */ Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1431:48: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1431 | PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1431:9: note: in expansion of macro ‘PE_OHDR’ # 1431 | PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000); # | ^~~~~~~ # 1429| # 1430| /* Do these really matter? */ # 1431|-> PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000); # 1432| PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); # 1433| PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1432:47: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1432 | PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1432:9: note: in expansion of macro ‘PE_OHDR’ # 1432 | PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); # | ^~~~~~~ # 1430| /* Do these really matter? */ # 1431| PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000); # 1432|-> PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); # 1433| PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); # 1434| PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1433:47: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1433 | PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1433:9: note: in expansion of macro ‘PE_OHDR’ # 1433 | PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); # | ^~~~~~~ # 1431| PE_OHDR (o32, o64, stack_reserve_size) = grub_host_to_target32 (0x10000); # 1432| PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); # 1433|-> PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); # 1434| PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); # 1435| Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1434:46: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1434 | PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1434:9: note: in expansion of macro ‘PE_OHDR’ # 1434 | PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); # | ^~~~~~~ # 1432| PE_OHDR (o32, o64, stack_commit_size) = grub_host_to_target32 (0x10000); # 1433| PE_OHDR (o32, o64, heap_reserve_size) = grub_host_to_target32 (0x10000); # 1434|-> PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); # 1435| # 1436| PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1436:50: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1436 | PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1436:9: note: in expansion of macro ‘PE_OHDR’ # 1436 | PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES); # | ^~~~~~~ # 1434| PE_OHDR (o32, o64, heap_commit_size) = grub_host_to_target32 (0x10000); # 1435| # 1436|-> PE_OHDR (o32, o64, num_data_directories) = grub_host_to_target32 (GRUB_PE32_NUM_DATA_DIRECTORIES); # 1437| # 1438| /* The sections. */ Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1439:39: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1439 | PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1439:9: note: in expansion of macro ‘PE_OHDR’ # 1439 | PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma); # | ^~~~~~~ # 1437| # 1438| /* The sections. */ # 1439|-> PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma); # 1440| PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size); # 1441| section = init_pe_section (image_target, section, ".text", Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1440:39: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1440 | PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1440:9: note: in expansion of macro ‘PE_OHDR’ # 1440 | PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size); # | ^~~~~~~ # 1438| /* The sections. */ # 1439| PE_OHDR (o32, o64, code_base) = grub_host_to_target32 (vma); # 1440|-> PE_OHDR (o32, o64, code_size) = grub_host_to_target32 (layout.exec_size); # 1441| section = init_pe_section (image_target, section, ".text", # 1442| &vma, layout.exec_size, Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1451:39: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1451 | PE_OHDR (o32, o64, data_size) = grub_host_to_target32 (scn_size + sbat_size + grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1451:9: note: in expansion of macro ‘PE_OHDR’ # 1451 | PE_OHDR (o32, o64, data_size) = grub_host_to_target32 (scn_size + sbat_size + # | ^~~~~~~ # 1449| scn_size = ALIGN_UP (layout.kernel_size - layout.exec_size, GRUB_PE32_FILE_ALIGNMENT); # 1450| /* ALIGN_UP (sbat_size, GRUB_PE32_FILE_ALIGNMENT) is done earlier. */ # 1451|-> PE_OHDR (o32, o64, data_size) = grub_host_to_target32 (scn_size + sbat_size + # 1452| ALIGN_UP (total_module_size, # 1453| GRUB_PE32_FILE_ALIGNMENT)); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1484:55: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1484 | PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1484:9: note: in expansion of macro ‘PE_OHDR’ # 1484 | PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma); # | ^~~~~~~ # 1482| # 1483| scn_size = layout.reloc_size; # 1484|-> PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma); # 1485| PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size); # 1486| memcpy (pe_img + raw_data, layout.reloc_section, scn_size); Error: COMPILER_WARNING: grub-2.06/util/mkimage.c:1485:56: warning[-Wdangling-pointer=]: dangling pointer to ‘tmp_’ may be used # 1485 | PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size); grub-2.06/util/mkimage.c:857:28: note: ‘tmp_’ declared here # 857 | __typeof__((o64)->field) tmp_; \ # | ^~~~ grub-2.06/util/mkimage.c:1485:9: note: in expansion of macro ‘PE_OHDR’ # 1485 | PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size); # | ^~~~~~~ # 1483| scn_size = layout.reloc_size; # 1484| PE_OHDR (o32, o64, base_relocation_table.rva) = grub_host_to_target32 (vma); # 1485|-> PE_OHDR (o32, o64, base_relocation_table.size) = grub_host_to_target32 (scn_size); # 1486| memcpy (pe_img + raw_data, layout.reloc_section, scn_size); # 1487| init_pe_section (image_target, section, ".reloc", Error: CLANG_WARNING: grub-2.06/util/setup_sparc.c:2: included_from: Included from here. grub-2.06/util/setup.c:312:3: warning[deadcode.DeadStores]: Value stored to 'core_dev' is never read # 310| grub_util_error ("%s", grub_errmsg); # 311| # 312|-> core_dev = dest_dev; # 313| # 314| { Error: COMPILER_WARNING (CWE-195): grub-2.06/util/setup_sparc.c:2: included_from: Included from here. grub-2.06/util/setup.c: scope_hint: In function ‘grub_util_sparc_setup’ grub-2.06/util/setup.c:661:25: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ # 661 | for (i = 0 ; isec < nsec; i++, isec++) # | ^ # 659| # 660| /* Write the core image onto the disk. */ # 661|-> for (i = 0 ; isec < nsec; i++, isec++) # 662| { # 663| if (grub_disk_write (dest_dev->disk, sectors[isec], 0,