grub2-2.12-10.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/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): [#def2]
/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): [#def3]
/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): [#def4]
/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): [#def5]
/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): [#def6]
/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): [#def7]
/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): [#def8]
/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): [#def9]
/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): [#def10]
/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): [#def11]
/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): [#def12]
/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): [#def13]
/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): [#def14]
/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): [#def15]
/etc/grub.d/10_linux:81:9: warning[SC2154]: grub_probe is referenced but not assigned.
#   79|   	fi;;
#   80|       xzfs)
#   81|-> 	rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
#   82|   	bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
#   83|   	LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"

Error: SHELLCHECK_WARNING: [#def16]
/etc/grub.d/10_linux:147:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  145|       fi
#  146|   
#  147|->     local IFS=$'\n'
#  148|   
#  149|       files=($(for bls in ${blsdir}/*.conf; do

Error: SHELLCHECK_WARNING: [#def17]
/etc/grub.d/10_linux:147:15: warning[SC3003]: In POSIX sh, $'..' is undefined.
#  145|       fi
#  146|   
#  147|->     local IFS=$'\n'
#  148|   
#  149|       files=($(for bls in ${blsdir}/*.conf; do

Error: SHELLCHECK_WARNING: [#def18]
/etc/grub.d/10_linux:149:11: warning[SC3030]: In POSIX sh, arrays are undefined.
#  147|       local IFS=$'\n'
#  148|   
#  149|->     files=($(for bls in ${blsdir}/*.conf; do
#  150|           if ! [[ -e "${bls}" ]] ; then
#  151|               continue

Error: SHELLCHECK_WARNING (CWE-140): [#def19]
/etc/grub.d/10_linux:149:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  147|       local IFS=$'\n'
#  148|   
#  149|->     files=($(for bls in ${blsdir}/*.conf; do
#  150|           if ! [[ -e "${bls}" ]] ; then
#  151|               continue

Error: SHELLCHECK_WARNING: [#def20]
/etc/grub.d/10_linux:150:14: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  148|   
#  149|       files=($(for bls in ${blsdir}/*.conf; do
#  150|->         if ! [[ -e "${bls}" ]] ; then
#  151|               continue
#  152|           fi

Error: SHELLCHECK_WARNING: [#def21]
/etc/grub.d/10_linux:158:11: warning[SC3054]: In POSIX sh, array references are undefined.
#  156|       done | sort -Vr 2>/dev/null)) || :
#  157|   
#  158|->     echo "${files[@]}"
#  159|   }
#  160|   

Error: SHELLCHECK_WARNING: [#def22]
/etc/grub.d/10_linux:163:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  161|   update_bls_cmdline()
#  162|   {
#  163|->     local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
#  164|       local -a files=($(get_sorted_bls))
#  165|   

Error: SHELLCHECK_WARNING: [#def23]
/etc/grub.d/10_linux:164:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  162|   {
#  163|       local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
#  164|->     local -a files=($(get_sorted_bls))
#  165|   
#  166|       if [ -w /etc/kernel ] &&

Error: SHELLCHECK_WARNING: [#def24]
/etc/grub.d/10_linux:164:20: warning[SC3030]: In POSIX sh, arrays are undefined.
#  162|   {
#  163|       local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
#  164|->     local -a files=($(get_sorted_bls))
#  165|   
#  166|       if [ -w /etc/kernel ] &&

Error: SHELLCHECK_WARNING (CWE-156): [#def25]
/etc/grub.d/10_linux:164:21: warning[SC2046]: Quote this to prevent word splitting.
#  162|   {
#  163|       local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
#  164|->     local -a files=($(get_sorted_bls))
#  165|   
#  166|       if [ -w /etc/kernel ] &&

Error: SHELLCHECK_WARNING (CWE-140): [#def26]
/etc/grub.d/10_linux:164:21: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  162|   {
#  163|       local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
#  164|->     local -a files=($(get_sorted_bls))
#  165|   
#  166|       if [ -w /etc/kernel ] &&

Error: SHELLCHECK_WARNING: [#def27]
/etc/grub.d/10_linux:167:12: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  165|   
#  166|       if [ -w /etc/kernel ] &&
#  167|->            [[ ! -f /etc/kernel/cmdline ||
#  168|                     /etc/kernel/cmdline -ot /etc/default/grub ]]; then
#  169|           # anaconda has the correct information to create this during install;

Error: SHELLCHECK_WARNING: [#def28]
/etc/grub.d/10_linux:175:17: warning[SC3054]: In POSIX sh, array references are undefined.
#  173|       fi
#  174|   
#  175|->     for bls in "${files[@]}"; do
#  176|           local options="${cmdline}"
#  177|           if [ -z "${bls##*debug*}" ]; then

Error: SHELLCHECK_WARNING: [#def29]
/etc/grub.d/10_linux:176:9: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  174|   
#  175|       for bls in "${files[@]}"; do
#  176|->         local options="${cmdline}"
#  177|           if [ -z "${bls##*debug*}" ]; then
#  178|               options="${options} ${GRUB_CMDLINE_LINUX_DEBUG}"

Error: SHELLCHECK_WARNING: [#def30]
/etc/grub.d/10_linux:187:5: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  185|   populate_menu()
#  186|   {
#  187|->     local -a files=($(get_sorted_bls))
#  188|   
#  189|       gettext_printf "Generating boot entries from BLS files...\n" >&2

Error: SHELLCHECK_WARNING: [#def31]
/etc/grub.d/10_linux:187:20: warning[SC3030]: In POSIX sh, arrays are undefined.
#  185|   populate_menu()
#  186|   {
#  187|->     local -a files=($(get_sorted_bls))
#  188|   
#  189|       gettext_printf "Generating boot entries from BLS files...\n" >&2

Error: SHELLCHECK_WARNING (CWE-156): [#def32]
/etc/grub.d/10_linux:187:21: warning[SC2046]: Quote this to prevent word splitting.
#  185|   populate_menu()
#  186|   {
#  187|->     local -a files=($(get_sorted_bls))
#  188|   
#  189|       gettext_printf "Generating boot entries from BLS files...\n" >&2

Error: SHELLCHECK_WARNING (CWE-140): [#def33]
/etc/grub.d/10_linux:187:21: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  185|   populate_menu()
#  186|   {
#  187|->     local -a files=($(get_sorted_bls))
#  188|   
#  189|       gettext_printf "Generating boot entries from BLS files...\n" >&2

Error: SHELLCHECK_WARNING: [#def34]
/etc/grub.d/10_linux:191:17: warning[SC3054]: In POSIX sh, array references are undefined.
#  189|       gettext_printf "Generating boot entries from BLS files...\n" >&2
#  190|   
#  191|->     for bls in "${files[@]}"; do
#  192|           read_config "${blsdir}/${bls}.conf"
#  193|   

Error: SHELLCHECK_WARNING (CWE-457): [#def35]
/etc/grub.d/10_linux:197:36: warning[SC2154]: boot_prefix is referenced but not assigned.
#  195|           menu="${menu}\t linux ${linux} ${options}\n"
#  196|           if [ -n "${initrd}" ] ; then
#  197|->             menu="${menu}\t initrd ${boot_prefix}${initrd}\n"
#  198|           fi
#  199|           menu="${menu}}\n\n"

Error: SHELLCHECK_WARNING: [#def36]
/etc/grub.d/10_linux:236:19: warning[SC3045]: In POSIX sh, read -d is undefined.
#  234|   
#  235|         if test -e ${petitboot_path}; then
#  236|->           read -r -d '' petitboot_version < ${petitboot_path}
#  237|             petitboot_version="$(echo ${petitboot_version//v})"
#  238|   

Error: SHELLCHECK_WARNING: [#def37]
/etc/grub.d/10_linux:237:37: warning[SC3060]: In POSIX sh, string replacement is undefined.
#  235|         if test -e ${petitboot_path}; then
#  236|             read -r -d '' petitboot_version < ${petitboot_path}
#  237|->           petitboot_version="$(echo ${petitboot_version//v})"
#  238|   
#  239|   	  if test -n ${petitboot_version}; then

Error: SHELLCHECK_WARNING: [#def38]
/etc/grub.d/10_linux:244:18: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  242|   
#  243|                 re='^[0-9]+$'
#  244|->               if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
#  245|                    ([[ ${major_version} -gt 1 ]] ||
#  246|                     [[ ${major_version} -eq 1 &&

Error: SHELLCHECK_WARNING: [#def39]
/etc/grub.d/10_linux:244:49: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  242|   
#  243|                 re='^[0-9]+$'
#  244|->               if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
#  245|                    ([[ ${major_version} -gt 1 ]] ||
#  246|                     [[ ${major_version} -eq 1 &&

Error: SHELLCHECK_WARNING: [#def40]
/etc/grub.d/10_linux:245:19: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  243|                 re='^[0-9]+$'
#  244|                 if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
#  245|->                  ([[ ${major_version} -gt 1 ]] ||
#  246|                     [[ ${major_version} -eq 1 &&
#  247|                        ${minor_version} -ge 8  ]]); then

Error: SHELLCHECK_WARNING: [#def41]
/etc/grub.d/10_linux:246:19: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  244|                 if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
#  245|                    ([[ ${major_version} -gt 1 ]] ||
#  246|->                   [[ ${major_version} -eq 1 &&
#  247|                        ${minor_version} -ge 8  ]]); then
#  248|                     BLS_POPULATE_MENU="false"

Error: SHELLCHECK_WARNING (CWE-457): [#def42]
/etc/grub.d/10_linux:290:15: warning[SC2154]: grub_editenv is referenced but not assigned.
#  288|             blsdir=$(make_system_path_relative_to_its_root "${blsdir}")
#  289|             if [ "x${blsdir}" != "x/loader/entries" ] && [ "x${blsdir}" != "x/boot/loader/entries" ]; then
#  290|->               ${grub_editenv} - set blsdir="${blsdir}"
#  291|             fi
#  292|         fi

Error: SHELLCHECK_WARNING: [#def43]
/etc/grub.d/10_linux:312:3: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  310|   mktitle ()
#  311|   {
#  312|->   local title_type
#  313|     local version
#  314|     local OS_NAME

Error: SHELLCHECK_WARNING: [#def44]
/etc/grub.d/10_linux:313:3: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  311|   {
#  312|     local title_type
#  313|->   local version
#  314|     local OS_NAME
#  315|     local OS_VERS

Error: SHELLCHECK_WARNING: [#def45]
/etc/grub.d/10_linux:314:3: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  312|     local title_type
#  313|     local version
#  314|->   local OS_NAME
#  315|     local OS_VERS
#  316|   

Error: SHELLCHECK_WARNING: [#def46]
/etc/grub.d/10_linux:315:3: warning[SC3043]: In POSIX sh, 'local' is undefined.
#  313|     local version
#  314|     local OS_NAME
#  315|->   local OS_VERS
#  316|   
#  317|     title_type=$1 && shift

Error: SHELLCHECK_WARNING (CWE-156): [#def47]
/etc/grub.d/10_linux:320:19: warning[SC2046]: Quote this to prevent word splitting.
#  318|     version=$1 && shift
#  319|   
#  320|->   OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
#  321|     OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
#  322|   

Error: SHELLCHECK_WARNING (CWE-156): [#def48]
/etc/grub.d/10_linux:321:19: warning[SC2046]: Quote this to prevent word splitting.
#  319|   
#  320|     OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
#  321|->   OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
#  322|   
#  323|     case $title_type in

Error: SHELLCHECK_WARNING: [#def49]
/etc/grub.d/10_linux:333:8: warning[SC3037]: In POSIX sh, echo flags are undefined.
#  331|         ;;
#  332|     esac
#  333|->   echo -n ${title}
#  334|   }
#  335|   

Error: SHELLCHECK_WARNING (CWE-457): [#def50]
/etc/grub.d/10_linux:565:26: warning[SC2154]: grub_tab is referenced but not assigned.
#  563|       fi
#  564|   
#  565|->     submenu_indentation="$grub_tab"
#  566|   
#  567|       if [ -z "$boot_device_id" ]; then

Error: SHELLCHECK_WARNING (CWE-563): [#def51]
/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): [#def52]
/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): [#def53]
/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): [#def54]
/etc/grub.d/20_linux_xen:88:9: warning[SC2154]: grub_probe is referenced but not assigned.
#   86|   	fi;;
#   87|       xzfs)
#   88|-> 	rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
#   89|   	bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
#   90|   	LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"

Error: SHELLCHECK_WARNING (CWE-457): [#def55]
/etc/grub.d/20_linux_xen:273:9: warning[SC2154]: grub_file is referenced but not assigned.
#  271|   	echo "	submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
#  272|       fi
#  273|->     if ($grub_file --is-arm64-efi $current_xen); then
#  274|   	xen_module="xen_boot"
#  275|   	xen_loader="xen_hypervisor"

Error: SHELLCHECK_WARNING (CWE-457): [#def56]
/etc/grub.d/20_linux_xen:360:27: warning[SC2154]: grub_tab is referenced but not assigned.
#  358|   		"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
#  359|   
#  360|-> 	    submenu_indentation="$grub_tab$grub_tab"
#  361|       
#  362|   	    if [ -z "$boot_device_id" ]; then

Error: SHELLCHECK_WARNING (CWE-563): [#def57]
/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): [#def58]
/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): [#def59]
/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): [#def60]
/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): [#def61]
/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): [#def62]
/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): [#def63]
/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): [#def64]
/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): [#def65]
/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): [#def66]
/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): [#def67]
/etc/grub.d/30_os-prober:234:35: warning[SC2154]: grub_tab is referenced but not assigned.
#  232|   	menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
#  233|   EOF
#  234|-> 	save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
#  235|   	printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
#  236|   	cat <<  EOF

Error: SHELLCHECK_WARNING (CWE-457): [#def68]
/etc/grub.d/30_os-prober:251:241: warning[SC2154]: version is referenced but not assigned.
#  249|   	    quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
#  250|   	    title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
#  251|-> 	    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")"
#  252|   	fi
#  253|         done

Error: SHELLCHECK_WARNING (CWE-457): [#def69]
/etc/grub.d/30_os-prober:251:250: warning[SC2154]: type is referenced but not assigned (for output from commands, use "$(type ...)" ).
#  249|   	    quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
#  250|   	    title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
#  251|-> 	    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")"
#  252|   	fi
#  253|         done

Error: SHELLCHECK_WARNING: [#def70]
/etc/grub.d/30_os-prober:262:5: warning[SC3010]: In POSIX sh, [[ ]] is undefined.
#  260|         for subdevice in ${DEVICE%[[:digit:]]*}* ; do
#  261|   	parttype="`"${grub_probe}" --device ${device} --target=gpt_parttype "${subdevice}" 2> /dev/null`"
#  262|-> 	if [[ "$parttype" = "426f6f74-0000-11aa-aa11-00306543ecac" ]]; then
#  263|   	  DEVICE="${subdevice}" osx_entry
#  264|   	fi

Error: SHELLCHECK_WARNING (CWE-563): [#def71]
/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): [#def72]
/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): [#def73]
/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): [#def74]
/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): [#def75]
/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): [#def76]
/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): [#def77]
/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): [#def78]
/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): [#def79]
/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): [#def80]
/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): [#def81]
/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): [#def82]
/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): [#def83]
/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): [#def84]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
/usr/lib/grub/i386-efi/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def85]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-efi-2.12 -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): [#def86]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|-> grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-efi-2.12 -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  -Wa,-mx86-used-note=no'
/usr/lib/grub/i386-efi/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def87]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def88]
/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-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def89]
/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/grub2-2.12-build/grub-2.12/grub-i386-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def90]
/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  -Wa,-mx86-used-note=no'
#   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): [#def91]
/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): [#def92]
/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): [#def93]
/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): [#def94]
/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): [#def95]
/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): [#def96]
/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): [#def97]
/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): [#def98]
/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): [#def99]
/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): [#def100]
/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): [#def101]
/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.12"
#   36|   grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def102]
/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.12"
#   36|-> grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def103]
/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.12"
#   36|   grub_package="grub"
#   37|-> grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"
#   39|   grub_package_name="GRUB"

Error: SHELLCHECK_WARNING (CWE-563): [#def104]
/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.12"
#   38|-> grub_package_version="2.12"
#   39|   grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def105]
/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.12"
#   38|   grub_package_version="2.12"
#   39|-> grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def106]
/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.12"
#   39|   grub_package_name="GRUB"
#   40|-> grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def107]
/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): [#def108]
/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): [#def109]
/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): [#def110]
/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): [#def111]
/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): [#def112]
/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): [#def113]
/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): [#def114]
/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): [#def115]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
/usr/lib/grub/i386-pc/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def116]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-pc-2.12 -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): [#def117]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|-> grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-pc-2.12 -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  -Wa,-mx86-used-note=no'
/usr/lib/grub/i386-pc/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def118]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common 	 -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-y2 [...]
#   19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-pc-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def119]
/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-common 	 -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-y2 [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-i386-pc-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def120]
/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/grub2-2.12-build/grub-2.12/grub-i386-pc-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def121]
/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  -Wa,-mx86-used-note=no'
#   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): [#def122]
/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): [#def123]
/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): [#def124]
/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): [#def125]
/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): [#def126]
/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): [#def127]
/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): [#def128]
/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): [#def129]
/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): [#def130]
/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): [#def131]
/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): [#def132]
/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.12"
#   36|   grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def133]
/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.12"
#   36|-> grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def134]
/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.12"
#   36|   grub_package="grub"
#   37|-> grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"
#   39|   grub_package_name="GRUB"

Error: SHELLCHECK_WARNING (CWE-563): [#def135]
/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.12"
#   38|-> grub_package_version="2.12"
#   39|   grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def136]
/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.12"
#   38|   grub_package_version="2.12"
#   39|-> grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def137]
/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.12"
#   39|   grub_package_name="GRUB"
#   40|-> grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def138]
/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): [#def139]
/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): [#def140]
/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): [#def141]
/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): [#def142]
/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): [#def143]
/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): [#def144]
/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): [#def145]
/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): [#def146]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 -Wimpl [...]
/usr/lib/grub/x86_64-efi/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def147]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 -Wimpl [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12 -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): [#def148]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|-> grub_target_cflags='-std=gnu99 -fno-common -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 -Wimpl [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12 -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  -Wa,-mx86-used-note=no'
/usr/lib/grub/x86_64-efi/modinfo.sh:18:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def149]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 -Wimpl [...]
#   19|-> grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def150]
/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-common -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 -Wimpl [...]
#   19|   grub_target_cppflags='-I/builddir/build/BUILD/grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def151]
/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/grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12 -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  -Wa,-mx86-used-note=no'
#   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): [#def152]
/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  -Wa,-mx86-used-note=no'
#   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): [#def153]
/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): [#def154]
/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): [#def155]
/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): [#def156]
/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): [#def157]
/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): [#def158]
/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): [#def159]
/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): [#def160]
/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): [#def161]
/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): [#def162]
/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): [#def163]
/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.12"
#   36|   grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def164]
/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.12"
#   36|-> grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def165]
/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.12"
#   36|   grub_package="grub"
#   37|-> grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"
#   39|   grub_package_name="GRUB"

Error: SHELLCHECK_WARNING (CWE-563): [#def166]
/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.12"
#   38|-> grub_package_version="2.12"
#   39|   grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def167]
/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.12"
#   38|   grub_package_version="2.12"
#   39|-> grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def168]
/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.12"
#   39|   grub_package_name="GRUB"
#   40|-> grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def169]
/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): [#def170]
/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): [#def171]
/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): [#def172]
/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): [#def173]
/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): [#def174]
/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): [#def175]
/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): [#def176]
/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): [#def177]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 - [...]
/usr/lib/grub/x86_64-emu/modinfo.sh:16:1: note: trimmed 1 message(s) with length over 512

Error: SHELLCHECK_WARNING (CWE-563): [#def178]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 - [...]
#   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): [#def179]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|-> grub_target_cflags='-std=gnu99 -fno-common -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 - [...]
#   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  -Wa,-mx86-used-note=no -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): [#def180]
/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.2.1 20241104 (Red Hat 14.2.1-6)'
#   18|   grub_target_cflags='-std=gnu99 -fno-common -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 - [...]
#   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  -Wa,-mx86-used-note=no -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): [#def181]
/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 -fno-common -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 - [...]
#   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  -Wa,-mx86-used-note=no -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): [#def182]
/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  -Wa,-mx86-used-note=no -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): [#def183]
/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  -Wa,-mx86-used-note=no -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): [#def184]
/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): [#def185]
/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): [#def186]
/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): [#def187]
/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): [#def188]
/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): [#def189]
/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): [#def190]
/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): [#def191]
/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): [#def192]
/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): [#def193]
/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): [#def194]
/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.12"
#   36|   grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def195]
/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.12"
#   36|-> grub_package="grub"
#   37|   grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"

Error: SHELLCHECK_WARNING (CWE-563): [#def196]
/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.12"
#   36|   grub_package="grub"
#   37|-> grub_package_string="GRUB 2.12"
#   38|   grub_package_version="2.12"
#   39|   grub_package_name="GRUB"

Error: SHELLCHECK_WARNING (CWE-563): [#def197]
/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.12"
#   38|-> grub_package_version="2.12"
#   39|   grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def198]
/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.12"
#   38|   grub_package_version="2.12"
#   39|-> grub_package_name="GRUB"
#   40|   grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def199]
/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.12"
#   39|   grub_package_name="GRUB"
#   40|-> grub_package_bugreport="bug-grub@gnu.org"

Error: SHELLCHECK_WARNING (CWE-563): [#def200]
/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): [#def201]
/usr/lib/kernel/install.d/20-grub.install:129:42: warning[SC2174]: When used with -p, -m only applies to the deepest directory.
#  127|   
#  128|               eval "$(grub2-get-kernel-settings)" || true
#  129|->             [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
#  130|               BLS_ID="${MACHINE_ID}-${KERNEL_VERSION}"
#  131|               BLS_TARGET="${BLS_DIR}/${BLS_ID}.conf"

Error: SHELLCHECK_WARNING (CWE-156): [#def202]
/usr/lib/kernel/install.d/20-grub.install:139:43: warning[SC2046]: Quote this to prevent word splitting.
#  137|               LINUX="$(grep '^linux[ \t]' "${BLS_TARGET}" | sed -e 's,^linux[ \t]*,,')"
#  138|               INITRD="$(grep '^initrd[ \t]' "${BLS_TARGET}" | sed -e 's,^initrd[ \t]*,,')"
#  139|->             if [[ "$(grub2-probe --device $(grub2-probe --target=device /) --target=fs)" == "btrfs" &&
#  140|   		      "${SUSE_BTRFS_SNAPSHOT_BOOTING}" == "true" ]]; then
#  141|                   LINUX_RELPATH="$(grub2-mkrelpath -r /boot${LINUX})"

Error: SHELLCHECK_WARNING (CWE-153): [#def203]
/usr/lib/kernel/install.d/20-grub.install:148:29: warning[SC2053]: Quote the right-hand side of != in [[ ]] to prevent glob matching.
#  146|               ROOTPREFIX="$(dirname "/boot${LINUX}")"
#  147|   
#  148|->             if [[ $LINUX != $LINUX_RELPATH ]]; then
#  149|                   sed -i -e "s,^linux.*,linux ${BOOTPREFIX}${LINUX},g" "${BLS_TARGET}"
#  150|                   sed -i -e "s,^initrd.*,initrd ${BOOTPREFIX}${INITRD},g" "${BLS_TARGET}"

Error: SHELLCHECK_WARNING (CWE-477): [#def204]
/usr/lib/kernel/install.d/20-grub.install:172:39: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  170|                   sed -i -e "s/^title.*/title ${TITLE}${GRUB_LINUX_DEBUG_TITLE_POSTFIX}/" "${BLS_DEBUG}"
#  171|                   sed -i -e "s/^options.*/options ${OPTIONS}/" "${BLS_DEBUG}"
#  172|->                 if [ -n "$NEWDEFAULT" -a "x$GRUB_DEFAULT_TO_DEBUG" = "xtrue" ]; then
#  173|                       NEWDEFAULT="${BLS_DEBUG_ID}"
#  174|                   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def205]
/usr/lib/kernel/install.d/20-grub.install:181:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  179|   
#  180|               # this probably isn't the best place to do this, but it will do for now.
#  181|->             if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \
#  182|                    "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \
#  183|                    -x /usr/lib/kernel/install.d/50-dracut.install ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def206]
/usr/lib/kernel/install.d/20-grub.install:181:76: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  179|   
#  180|               # this probably isn't the best place to do this, but it will do for now.
#  181|->             if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \
#  182|                    "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \
#  183|                    -x /usr/lib/kernel/install.d/50-dracut.install ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def207]
/usr/lib/kernel/install.d/20-grub.install:182:71: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  180|               # this probably isn't the best place to do this, but it will do for now.
#  181|               if [ -e "${ROOTPREFIX}${INITRD}" -a -e "${ROOTPREFIX}${LINUX}" -a \
#  182|->                  "${ROOTPREFIX}${INITRD}" -ot "${ROOTPREFIX}${LINUX}" -a \
#  183|                    -x /usr/lib/kernel/install.d/50-dracut.install ]; then
#  184|                   rm -f "${ROOTPREFIX}${INITRD}"

Error: SHELLCHECK_WARNING: [#def208]
/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: [#def209]
/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): [#def210]
/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): [#def211]
/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): [#def212]
/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.12
#   31|-> host_os=linux-gnu
#   32|   datadir="/usr/share"
#   33|   if [ "x$pkgdatadir" = x ]; then

Error: SHELLCHECK_WARNING (CWE-563): [#def213]
/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): [#def214]
/usr/sbin/grub2-mkconfig:196:5: warning[SC2034]: termoutdefault appears unused. Verify use (or export if used externally).
#  194|   if [ "x${GRUB_TERMINAL_OUTPUT}" = "x" ]; then
#  195|       GRUB_TERMINAL_OUTPUT=gfxterm;
#  196|->     termoutdefault=1;
#  197|   fi
#  198|   

Error: SHELLCHECK_WARNING (CWE-563): [#def215]
/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): [#def216]
/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): [#def217]
/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.12

Error: SHELLCHECK_WARNING (CWE-563): [#def218]
/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): [#def219]
/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: [#def220]
/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: [#def221]
/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: [#def222]
/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: [#def223]
/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: [#def224]
/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): [#def225]
/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): [#def226]
/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.12

Error: SHELLCHECK_WARNING: [#def227]
/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: [#def228]
/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): [#def229]
/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: [#def230]
/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: [#def231]
/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): [#def232]
/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: [#def233]
/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: [#def234]
/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: [#def235]
/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: [#def236]
/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: [#def237]
/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): [#def238]
/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: [#def239]
/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: [#def240]
/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: [#def241]
/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: [#def242]
/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: [#def243]
/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: [#def244]
/usr/sbin/grub2-switch-to-blscfg:207:9: warning[SC3051]: 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): [#def245]
/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): [#def246]
/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): [#def247]
/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): [#def248]
/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: GCC_ANALYZER_WARNING (CWE-476): [#def249]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_free_tds’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:596:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev_virt’
grub2-2.12-build/grub-2.12/include/grub/dl.h:30: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def250]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_transaction’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:658:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td’
grub2-2.12-build/grub-2.12/include/grub/dl.h:26: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/types.h:269:51: note: in definition of macro ‘grub_cpu_to_le32’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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): [#def251]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:663:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td’
grub2-2.12-build/grub-2.12/include/grub/types.h:269:51: note: in definition of macro ‘grub_cpu_to_le32’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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): [#def252]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c: scope_hint: In function ‘finish_transfer’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:939:66: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev_virt’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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): [#def253]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c: scope_hint: In function ‘parse_halt’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:969:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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): [#def254]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c: scope_hint: In function ‘grub_ohci_cancel_transfer’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:1209:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/ohci.c:187:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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): [#def255]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/uhci.c: scope_hint: In function ‘grub_uhci_setup_transfer’
grub2-2.12-build/grub-2.12/grub-core/bus/usb/uhci.c:570:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev’
grub2-2.12-build/grub-2.12/include/grub/dl.h:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/bus/usb/uhci.c:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/misc.h:46:88: note: in definition of macro ‘grub_dprintf’
grub2-2.12-build/grub-2.12/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): [#def256]
grub2-2.12-build/grub-2.12/grub-core/bus/usb/uhci.c:576:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘td_prev’
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING: [#def257]
grub2-2.12-build/grub-2.12/include/grub/dl.h:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/commands/efi/env.c:18: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/commands/efi/env.c: scope_hint: In function ‘grub_efi_export_env’
grub2-2.12-build/grub-2.12/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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/commands/efi/env.c:111:40: note: format string is defined here
#  111 |   grub_dprintf ("efienv", "envblk is %lu bytes:\n\"%s\"\n", envblk_s.size, envblk_s.buf);
#      |                                      ~~^
#      |                                        |
#      |                                        long unsigned int
#      |                                      %u
#  109|       }
#  110|   
#  111|->   grub_dprintf ("efienv", "envblk is %lu bytes:\n\"%s\"\n", envblk_s.size, envblk_s.buf);
#  112|   
#  113|     grub_dprintf ("efienv", "removing GRUB_ENV\n");

Error: COMPILER_WARNING: [#def258]
grub2-2.12-build/grub-2.12/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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/commands/efi/env.c:116:49: note: format string is defined here
#  116 |     grub_dprintf ("efienv", "removal returned %ld\n", status);
#      |                                               ~~^
#      |                                                 |
#      |                                                 long int
#      |                                               %d
#  114|     status = grub_efi_set_variable ("GRUB_ENV", &grub_env_guid, NULL, 0);
#  115|     if (status != GRUB_EFI_SUCCESS)
#  116|->     grub_dprintf ("efienv", "removal returned %ld\n", status);
#  117|   
#  118|     grub_dprintf ("efienv", "setting GRUB_ENV\n");

Error: COMPILER_WARNING: [#def259]
grub2-2.12-build/grub-2.12/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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/commands/efi/env.c:122:58: note: format string is defined here
#  122 |     grub_dprintf ("efienv", "setting GRUB_ENV returned %ld\n", status);
#      |                                                        ~~^
#      |                                                          |
#      |                                                          long int
#      |                                                        %d
#  120|   				  envblk_s.buf, envblk_s.size);
#  121|     if (status != GRUB_EFI_SUCCESS)
#  122|->     grub_dprintf ("efienv", "setting GRUB_ENV returned %ld\n", status);
#  123|   
#  124|     return 0;

Error: GCC_ANALYZER_WARNING (CWE-469): [#def260]
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c: scope_hint: In function ‘install_int13_handler’
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c:81:32: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c:311:16: note: in expansion of macro ‘INT13H_OFFSET’
grub2-2.12-build/grub-2.12/include/grub/command.h:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/extcmd.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c:301:3: note: in expansion of macro ‘grub_dprintf’
grub2-2.12-build/grub-2.12/grub-core/commands/i386/pc/drivemap.c:311:16: note: in expansion of macro ‘INT13H_OFFSET’
#   79|   
#   80|   #define INT13H_OFFSET(x) \
#   81|-> 	(((grub_uint8_t *)(x)) - ((grub_uint8_t *)&grub_drivemap_handler))
#   82|   
#   83|   static drivemap_node_t *map_head;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
grub2-2.12-build/grub-2.12/grub-core/commands/legacycfg.c: scope_hint: In function ‘legacy_file’
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING (CWE-563): [#def262]
grub2-2.12-build/grub-2.12/grub-core/commands/search.c:206:31: warning[-Wunused-variable]: unused variable ‘dev’
#  206 |                 grub_device_t dev, dev_part;
#      |                               ^~~
#  204|       	        name_disk != NULL && *name_disk != '\0')
#  205|                 {
#  206|->                 grub_device_t dev, dev_part;
#  207|   
#  208|                   if (is_device_usb(name) && !is_device_usb(root_dev))

Error: COMPILER_WARNING (CWE-563): [#def263]
grub2-2.12-build/grub-2.12/grub-core/commands/search.c:206:36: warning[-Wunused-variable]: unused variable ‘dev_part’
#  206 |                 grub_device_t dev, dev_part;
#      |                                    ^~~~~~~~
#  204|       	        name_disk != NULL && *name_disk != '\0')
#  205|                 {
#  206|->                 grub_device_t dev, dev_part;
#  207|   
#  208|                   if (is_device_usb(name) && !is_device_usb(root_dev))

Error: COMPILER_WARNING (CWE-563): [#def264]
grub2-2.12-build/grub-2.12/grub-core/commands/search.c:211:25: warning[-Wunused-variable]: unused variable ‘longlist’
#  211 |                     int longlist = 0;
#      |                         ^~~~~~~~
#  209|                     {
#  210|                       char *quid_name = NULL;
#  211|->                     int longlist = 0;
#  212|                       struct uuid_context uuid_ctx;
#  213|                       int ret = 0;

Error: COMPILER_WARNING (CWE-704): [#def265]
grub2-2.12-build/grub-2.12/grub-core/commands/search_uuid.c:5: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/commands/search.c: scope_hint: In function ‘iterate_device’
grub2-2.12-build/grub-2.12/grub-core/commands/search.c:218:39: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  216|                       if (!grub_strcmp(quid_name, ctx->key))
#  217|                         {
#  218|->                         uuid_ctx.name = name;
#  219|                           uuid_ctx.uuid = quid_name;
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def266]
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/efiemu.c: scope_hint: In function ‘efiemu_set_variable.part.0’
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/efiemu.c:547:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘efivar’
grub2-2.12-build/grub-2.12/include/grub/types.h:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/efiemu.c:31: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/config.h:27:22: note: in definition of macro ‘EFI_FUNC’
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/efiemu.c: scope_hint: In function ‘efiemu_set_variable.part.0’
grub2-2.12-build/grub-2.12/grub-core/efiemu/runtime/efiemu.c: scope_hint: In function ‘efiemu_set_variable.part.0’
#  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): [#def267]
grub2-2.12-build/grub-2.12/grub-core/font/font.c: scope_hint: In function ‘grub_font_construct_dry_run’
grub2-2.12-build/grub-2.12/grub-core/font/font.c:1497:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘comb’
grub2-2.12-build/grub-2.12/include/grub/font.h:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/font/font.c:23: included_from: Included from here.
/usr/include/locale.h:28: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/i18n.h:32: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/misc.h:27: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/dl.h:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/partition.h:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/fs.h:30: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/file.h:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/bufio.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/font/font.c:20: included_from: Included from here.
# 1495|       combining_glyphs[i]
# 1496|         = grub_font_get_glyph_with_fallback (main_glyph->font,
# 1497|-> 					   comb[i].code);
# 1498|   
# 1499|     blit_comb (glyph_id, NULL, bounds, main_glyph, combining_glyphs,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def268]
grub2-2.12-build/grub-2.12/include/grub/file.h:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/fs/afs.c:2: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c: scope_hint: In function ‘iterate_in_b_tree’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:542:53: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:542:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:542:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:50:34: note: in expansion of macro ‘grub_bfs_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:542:23: note: in expansion of macro ‘grub_bfs_to_cpu_treehead’
#  540|   	return 0;
#  541|   
#  542|->       for (i = 0; i < grub_bfs_to_cpu_treehead (node->count_keys); i++)
#  543|   	{
#  544|   	  char c;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def269]
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c: scope_hint: In function ‘find_in_b_tree’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:620:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
grub2-2.12-build/grub-2.12/include/grub/file.h:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:1059:22: note: in expansion of macro ‘grub_bfs_to_cpu32’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:1064:27: note: in expansion of macro ‘grub_bfs_to_cpu32’
grub2-2.12-build/grub-2.12/include/grub/types.h:272:51: note: in definition of macro ‘grub_le_to_cpu32’
grub2-2.12-build/grub-2.12/grub-core/fs/bfs.c:1022:26: note: in expansion of macro ‘grub_bfs_to_cpu32’
#  618|   	return err;
#  619|   
#  620|->       if (node->count_keys == 0)
#  621|   	{
#  622|   	  grub_free (node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def270]
grub2-2.12-build/grub-2.12/grub-core/fs/fshelp.c: scope_hint: In function ‘directory_find_file’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def271]
grub2-2.12-build/grub-2.12/grub-core/fs/fshelp.c: scope_hint: In function ‘find_file’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-835): [#def272]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/efi.c: scope_hint: In function ‘grub_reboot’
grub2-2.12-build/grub-2.12/grub-core/kern/efi/efi.c:187:3: warning[-Wanalyzer-infinite-loop]: infinite loop
#  185|   							 GRUB_EFI_SUCCESS, 0,
#  186|   							 NULL);
#  187|->   for (;;) ;
#  188|   }
#  189|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def273]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/efi.c: scope_hint: In function ‘grub_exit’
grub2-2.12-build/grub-2.12/grub-core/kern/efi/efi.c:201:3: warning[-Wanalyzer-infinite-loop]: infinite loop
#  199|     grub_efi_system_table->boot_services->exit (grub_efi_image_handle,
#  200|   					      rc, 0, 0);
#  201|->   for (;;) ;
#  202|   }
#  203|   

Error: COMPILER_WARNING: [#def274]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_efi_allocate_pages_real’
grub2-2.12-build/grub-2.12/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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:177:50: note: format string is defined here
#  177 |                     "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#      |                                               ~~~^
#      |                                                  |
#      |                                                  long unsigned int
#      |                                               %0x
#  175|       {
#  176|         grub_dprintf ("efi",
#  177|-> 		    "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#  178|   		    alloctype, memtype, pages, address, status);
#  179|         grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));

Error: COMPILER_WARNING: [#def275]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘grub_efi_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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:177:60: note: format string is defined here
#  177 |                     "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#      |                                                       ~~~~~^
#      |                                                            |
#      |                                                            long unsigned int
#      |                                                       %016llx
#  175|       {
#  176|         grub_dprintf ("efi",
#  177|-> 		    "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#  178|   		    alloctype, memtype, pages, address, status);
#  179|         grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));

Error: COMPILER_WARNING: [#def276]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:177:21: warning[-Wformat=]: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘grub_efi_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}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:177:72: note: format string is defined here
#  177 |                     "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#      |                                                                   ~~~~~^
#      |                                                                        |
#      |                                                                        long unsigned int
#      |                                                                   %016x
#  175|       {
#  176|         grub_dprintf ("efi",
#  177|-> 		    "allocate_pages(%d, %d, 0x%0lx, 0x%016lx) = 0x%016lx\n",
#  178|   		    alloctype, memtype, pages, address, status);
#  179|         grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));

Error: COMPILER_WARNING: [#def277]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_nx_init’
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:628:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’}
#  628 |                     "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
#  629 |                     stack_current, err);
#      |                     ~~~~~~~~~~~~~
#      |                     |
#      |                     grub_addr_t {aka unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
#  626|       {
#  627|         grub_dprintf ("nx",
#  628|-> 		    "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#  629|   		    stack_current, err);
#  630|         grub_error_pop ();

Error: COMPILER_WARNING: [#def278]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:644:21: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’}
#  644 |                     "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
#  645 |                     stack_current, err);
#      |                     ~~~~~~~~~~~~~
#      |                     |
#      |                     grub_addr_t {aka unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
#  642|       {
#  643|         grub_dprintf ("nx",
#  644|-> 		    "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#  645|   		    stack_current, err);
#  646|         grub_error_pop ();

Error: COMPILER_WARNING: [#def279]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:665:25: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘grub_addr_t’ {aka ‘unsigned int’}
#  665 |                         "grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
#  666 |                         stack_current, err);
#      |                         ~~~~~~~~~~~~~
#      |                         |
#      |                         grub_addr_t {aka unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
#  663|   	{
#  664|   	  grub_dprintf ("nx",
#  665|-> 			"grub_get_mem_attrs(0x%"PRIxGRUB_UINT64_T", ...) -> 0x%x\n",
#  666|   			stack_current, err);
#  667|   	  grub_error_pop ();

Error: COMPILER_WARNING: [#def280]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_get_mem_attrs’
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:871: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’}
#  871 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n",
#      |                           ^~~~~~~~~~~~~~~~~~
#  872 |                     __func__, physaddr, physaddr+size-1, attrs);
#      |                               ~~~~~~~~
#      |                               |
#      |                               grub_efi_physical_address_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:871:44: note: format string is defined here
#  871 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n",
#      |                                           ~^
#      |                                            |
#      |                                            unsigned int
#      |                                           %llx
#  869|     if (physaddr & 0xfff || size & 0xfff || size == 0 || attrs == NULL)
#  870|       {
#  871|->       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n",
#  872|   		    __func__, physaddr, physaddr+size-1, attrs);
#  873|         return 0;

Error: COMPILER_WARNING: [#def281]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:871: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’}
#  871 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n",
#      |                           ^~~~~~~~~~~~~~~~~~
#  872 |                     __func__, physaddr, physaddr+size-1, attrs);
#      |                                         ~~~~~~~~~~~~~~~
#      |                                                      |
#      |                                                      grub_efi_physical_address_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
#  869|     if (physaddr & 0xfff || size & 0xfff || size == 0 || attrs == NULL)
#  870|       {
#  871|->       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" and attrs %p\n",
#  872|   		    __func__, physaddr, physaddr+size-1, attrs);
#  873|         return 0;

Error: COMPILER_WARNING: [#def282]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c: scope_hint: In function ‘grub_update_mem_attrs’
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:905: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’}
#  905 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n",
#      |                           ^~~~~~~~~~~~~~~~~~
#  906 |                     __func__, physaddr, physaddr + size - 1,
#      |                               ~~~~~~~~
#      |                               |
#      |                               grub_efi_physical_address_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:905:44: note: format string is defined here
#  905 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n",
#      |                                           ~^
#      |                                            |
#      |                                            unsigned int
#      |                                           %llx
#  903|     if (physaddr & 0xfff || size & 0xfff || size == 0)
#  904|       {
#  905|->       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n",
#  906|   		    __func__, physaddr, physaddr + size - 1,
#  907|   		    (set_attrs & GRUB_MEM_ATTR_R) ? "r" : "",

Error: COMPILER_WARNING: [#def283]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:905: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’}
#  905 |       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n",
#      |                           ^~~~~~~~~~~~~~~~~~
#  906 |                     __func__, physaddr, physaddr + size - 1,
#      |                                         ~~~~~~~~~~~~~~~~~~~
#      |                                                         |
#      |                                                         grub_efi_physical_address_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
#  903|     if (physaddr & 0xfff || size & 0xfff || size == 0)
#  904|       {
#  905|->       grub_dprintf ("nx", "%s called on 0x%"PRIxGRUB_ADDR"-0x%"PRIxGRUB_ADDR" +%s%s%s -%s%s%s\n",
#  906|   		    __func__, physaddr, physaddr + size - 1,
#  907|   		    (set_attrs & GRUB_MEM_ATTR_R) ? "r" : "",

Error: COMPILER_WARNING: [#def284]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:917: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’}
#  917 |   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~
#      |                                                                      |
#      |                                                                      grub_uint64_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:917:55: note: format string is defined here
#  917 |   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#      |                                                     ~~^
#      |                                                       |
#      |                                                       long unsigned int
#      |                                                     %llx
#  915|   
#  916|     uefi_set_attrs = grub_mem_attrs_to_uefi_mem_attrs (set_attrs);
#  917|->   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#  918|     uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs);
#  919|     grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);

Error: COMPILER_WARNING: [#def285]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:917: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’}
#  917 |   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~             ~~~~~~~~~~~~~~
#      |                                                                                 |
#      |                                                                                 grub_uint64_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:917:64: note: format string is defined here
#  917 |   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#      |                                                              ~~^
#      |                                                                |
#      |                                                                long unsigned int
#      |                                                              %llx
#  915|   
#  916|     uefi_set_attrs = grub_mem_attrs_to_uefi_mem_attrs (set_attrs);
#  917|->   grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#  918|     uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs);
#  919|     grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);

Error: COMPILER_WARNING: [#def286]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:919: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’}
#  919 |   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
#      |                                                                        |
#      |                                                                        grub_uint64_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:919:57: note: format string is defined here
#  919 |   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#      |                                                       ~~^
#      |                                                         |
#      |                                                         long unsigned int
#      |                                                       %llx
#  917|     grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#  918|     uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs);
#  919|->   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#  920|     if (uefi_set_attrs)
#  921|       efi_status = proto->set_memory_attributes(

Error: COMPILER_WARNING: [#def287]
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:919: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’}
#  919 |   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               ~~~~~~~~~~~~~~~~
#      |                                                                                     |
#      |                                                                                     grub_uint64_t {aka long long unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/kern/efi/mm.c:919:66: note: format string is defined here
#  919 |   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#      |                                                                ~~^
#      |                                                                  |
#      |                                                                  long unsigned int
#      |                                                                %llx
#  917|     grub_dprintf ("nx", "translating set_attrs from 0x%lx to 0x%lx\n", set_attrs, uefi_set_attrs);
#  918|     uefi_clear_attrs = grub_mem_attrs_to_uefi_mem_attrs (clear_attrs);
#  919|->   grub_dprintf ("nx", "translating clear_attrs from 0x%lx to 0x%lx\n", clear_attrs, uefi_clear_attrs);
#  920|     if (uefi_set_attrs)
#  921|       efi_status = proto->set_memory_attributes(

Error: GCC_ANALYZER_WARNING (CWE-476): [#def288]
grub2-2.12-build/grub-2.12/grub-core/kern/env.c: scope_hint: In function ‘grub_register_variable_hook’
grub2-2.12-build/grub-2.12/grub-core/kern/env.c:227:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘var’
#  225|       }
#  226|   
#  227|->   var->read_hook = read_hook;
#  228|     var->write_hook = write_hook;
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def289]
grub2-2.12-build/grub-2.12/grub-core/kern/env.c: scope_hint: In function ‘grub_env_export’
grub2-2.12-build/grub-2.12/grub-core/kern/env.c:248:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘var’
#  246|         var = grub_env_find (name);
#  247|       }
#  248|->   var->global = 1;
#  249|   
#  250|     return GRUB_ERR_NONE;

Error: COMPILER_WARNING (CWE-569): [#def290]
grub2-2.12-build/grub-2.12/grub-core/kern/file.c: scope_hint: In function ‘grub_file_read’
grub2-2.12-build/grub-2.12/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-469): [#def291]
grub2-2.12-build/grub-2.12/grub-core/kern/i386/pc/init.c: scope_hint: In function ‘grub_machine_init’
grub2-2.12-build/grub-2.12/grub-core/kern/i386/pc/init.c:229:67: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
#  227|     grub_via_workaround_init ();
#  228|   
#  229|->   grub_modbase = GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR + (_edata - (grub_uint8_t *)_start);
#  230|   
#  231|     /* Initialize the console as early as possible.  */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def292]
grub2-2.12-build/grub-2.12/grub-core/kern/parser.c: scope_hint: In function ‘terminate_arg’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-835): [#def293]
grub2-2.12-build/grub-2.12/grub-core/lib/efi/halt.c: scope_hint: In function ‘grub_halt’
grub2-2.12-build/grub-2.12/grub-core/lib/efi/halt.c:40:9: warning[-Wanalyzer-infinite-loop]: infinite loop
#   38|   							 GRUB_EFI_SUCCESS, 0, NULL);
#   39|   
#   40|->   while (1);
#   41|   }

Error: CPPCHECK_WARNING (CWE-476): [#def294]
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING (CWE-195): [#def295]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/base64.c:48: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘imalloc’
grub2-2.12-build/grub-2.12/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): [#def296]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/base64.c:48: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘imalloc’
grub2-2.12-build/grub-2.12/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): [#def297]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘irealloc’
grub2-2.12-build/grub-2.12/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): [#def298]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘irealloc’
grub2-2.12-build/grub-2.12/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): [#def299]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘icalloc’
grub2-2.12-build/grub-2.12/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): [#def300]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘icalloc’
grub2-2.12-build/grub-2.12/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): [#def301]
grub2-2.12-build/grub-2.12/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): [#def302]
grub2-2.12-build/grub-2.12/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): [#def303]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘ireallocarray’
grub2-2.12-build/grub-2.12/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): [#def304]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/ialloc.h: scope_hint: In function ‘ireallocarray’
grub2-2.12-build/grub-2.12/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): [#def305]
grub2-2.12-build/grub-2.12/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): [#def306]
grub2-2.12-build/grub-2.12/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): [#def307]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:74: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘re_compile_fastmap_iter’
grub2-2.12-build/grub-2.12/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): [#def308]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:74: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘re_compile_fastmap_iter’
grub2-2.12-build/grub-2.12/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): [#def309]
grub2-2.12-build/grub-2.12/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): [#def310]
grub2-2.12-build/grub-2.12/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): [#def311]
grub2-2.12-build/grub-2.12/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): [#def312]
grub2-2.12-build/grub-2.12/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): [#def313]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘free_dfa_content’
grub2-2.12-build/grub-2.12/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): [#def314]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘free_dfa_content’
grub2-2.12-build/grub-2.12/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): [#def315]
grub2-2.12-build/grub-2.12/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): [#def316]
grub2-2.12-build/grub-2.12/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): [#def317]
grub2-2.12-build/grub-2.12/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): [#def318]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘init_dfa’
grub2-2.12-build/grub-2.12/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): [#def319]
grub2-2.12-build/grub-2.12/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): [#def320]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘init_word_char’
grub2-2.12-build/grub-2.12/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): [#def321]
grub2-2.12-build/grub-2.12/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): [#def322]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_utf8’
grub2-2.12-build/grub-2.12/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): [#def323]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_utf8’
grub2-2.12-build/grub-2.12/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): [#def324]
grub2-2.12-build/grub-2.12/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): [#def325]
grub2-2.12-build/grub-2.12/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): [#def326]
grub2-2.12-build/grub-2.12/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): [#def327]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘analyze’
grub2-2.12-build/grub-2.12/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): [#def328]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘analyze’
grub2-2.12-build/grub-2.12/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): [#def329]
grub2-2.12-build/grub-2.12/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): [#def330]
grub2-2.12-build/grub-2.12/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): [#def331]
grub2-2.12-build/grub-2.12/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): [#def332]
grub2-2.12-build/grub-2.12/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): [#def333]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘optimize_subexps’
grub2-2.12-build/grub-2.12/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): [#def334]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘lower_subexp’
grub2-2.12-build/grub-2.12/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): [#def335]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_inveclosure’
grub2-2.12-build/grub-2.12/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): [#def336]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_inveclosure’
grub2-2.12-build/grub-2.12/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): [#def337]
grub2-2.12-build/grub-2.12/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): [#def338]
grub2-2.12-build/grub-2.12/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): [#def339]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_eclosure’
grub2-2.12-build/grub-2.12/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): [#def340]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘calc_eclosure’
grub2-2.12-build/grub-2.12/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): [#def341]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regcomp.c: scope_hint: In function ‘parse_bracket_exp’
grub2-2.12-build/grub-2.12/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): [#def342]
grub2-2.12-build/grub-2.12/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): [#def343]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/libc-config.h:164: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_realloc_buffers’
grub2-2.12-build/grub-2.12/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))
#      |                             ^
grub2-2.12-build/grub-2.12/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): [#def344]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/libc-config.h:164: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_realloc_buffers’
grub2-2.12-build/grub-2.12/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))
#      |                             ^
grub2-2.12-build/grub-2.12/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): [#def345]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:73: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘build_wcs_upper_buffer’
grub2-2.12-build/grub-2.12/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): [#def346]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:73: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘build_wcs_upper_buffer’
grub2-2.12-build/grub-2.12/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): [#def347]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_reconstruct’
grub2-2.12-build/grub-2.12/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): [#def348]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c: scope_hint: In function ‘re_string_reconstruct’
grub2-2.12-build/grub-2.12/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): [#def349]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:71: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_not’
grub2-2.12-build/grub-2.12/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): [#def350]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_merge’
grub2-2.12-build/grub-2.12/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): [#def351]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h: scope_hint: In function ‘bitset_mask’
grub2-2.12-build/grub-2.12/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): [#def352]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_copy_regs’
grub2-2.12-build/grub-2.12/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))
#      |                                       ^
grub2-2.12-build/grub-2.12/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): [#def353]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h:40: included_from: Included from here.
grub2-2.12-build/grub-2.12/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);
#      |                           ^~
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/verify.h:300:22: note: in definition of macro ‘assume’
#  300 | # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
#      |                      ^
grub2-2.12-build/grub-2.12/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): [#def354]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:75: included_from: Included from here.
grub2-2.12-build/grub-2.12/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): [#def355]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_search_internal’
grub2-2.12-build/grub-2.12/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)))
#      |                              ^~
grub2-2.12-build/grub-2.12/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): [#def356]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘re_search_internal’
grub2-2.12-build/grub-2.12/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)))
#      |                              ^~
grub2-2.12-build/grub-2.12/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): [#def357]
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING (CWE-195): [#def358]
grub2-2.12-build/grub-2.12/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): [#def359]
grub2-2.12-build/grub-2.12/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): [#def360]
grub2-2.12-build/grub-2.12/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): [#def361]
grub2-2.12-build/grub-2.12/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): [#def362]
grub2-2.12-build/grub-2.12/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): [#def363]
grub2-2.12-build/grub-2.12/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): [#def364]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘prune_impossible_nodes’
grub2-2.12-build/grub-2.12/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))
#      |                         ^~
grub2-2.12-build/grub-2.12/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): [#def365]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘prune_impossible_nodes’
grub2-2.12-build/grub-2.12/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))
#      |                         ^~
grub2-2.12-build/grub-2.12/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): [#def366]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘set_regs’
grub2-2.12-build/grub-2.12/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): [#def367]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘set_regs’
grub2-2.12-build/grub-2.12/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): [#def368]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_dst_limits_calc_pos_1’
grub2-2.12-build/grub-2.12/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): [#def369]
grub2-2.12-build/grub-2.12/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): [#def370]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_subexp_matching_top’
grub2-2.12-build/grub-2.12/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): [#def371]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_arrival’
grub2-2.12-build/grub-2.12/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))
#      |                                                                 ^
grub2-2.12-build/grub-2.12/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): [#def372]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘check_arrival’
grub2-2.12-build/grub-2.12/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))
#      |                                                                 ^
grub2-2.12-build/grub-2.12/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): [#def373]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘build_trtable’
grub2-2.12-build/grub-2.12/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): [#def374]
grub2-2.12-build/grub-2.12/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): [#def375]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘group_nodes_into_DFAstates’
grub2-2.12-build/grub-2.12/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): [#def376]
grub2-2.12-build/grub-2.12/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): [#def377]
grub2-2.12-build/grub-2.12/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): [#def378]
grub2-2.12-build/grub-2.12/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): [#def379]
grub2-2.12-build/grub-2.12/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): [#def380]
grub2-2.12-build/grub-2.12/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): [#def381]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘extend_buffers’
grub2-2.12-build/grub-2.12/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))
#      |                         ^~
grub2-2.12-build/grub-2.12/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): [#def382]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘extend_buffers’
grub2-2.12-build/grub-2.12/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))
#      |                         ^~
grub2-2.12-build/grub-2.12/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): [#def383]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘match_ctx_init’
grub2-2.12-build/grub-2.12/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))
#      |                                                                       ^
grub2-2.12-build/grub-2.12/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): [#def384]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c: scope_hint: In function ‘match_ctx_init’
grub2-2.12-build/grub-2.12/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))
#      |                                                                       ^
grub2-2.12-build/grub-2.12/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): [#def385]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c: scope_hint: In function ‘vasnprintf’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1993:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘result’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/printf-parse.h:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:96: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’
grub2-2.12-build/grub-2.12/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): [#def386]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:5204:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf_malloced’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’
grub2-2.12-build/grub-2.12/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): [#def387]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:5204:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘result’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1875:7: note: in expansion of macro ‘PRINTF_FETCHARGS’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/vasnprintf.c:1956:3: note: in expansion of macro ‘ENSURE_ALLOCATION_ELSE’
grub2-2.12-build/grub-2.12/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): [#def388]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c: scope_hint: In function ‘grub_reboot’
grub2-2.12-build/grub-2.12/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-469): [#def389]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:42:59: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:25: included_from: Included from here.
#   40|       while (1);
#   41|     err = grub_relocator_alloc_chunk_align (relocator, &ch, 0x1000, 0x1000,
#   42|-> 					  grub_reboot_end - grub_reboot_start,
#   43|   					  16, GRUB_RELOCATOR_PREFERENCE_NONE,
#   44|   					  0);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def390]
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-469): [#def391]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:48:56: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
#   46|       while (1);
#   47|     buf = get_virtual_current_address (ch);
#   48|->   grub_memcpy (buf, grub_reboot_start, grub_reboot_end - grub_reboot_start);
#   49|   
#   50|     segment = ((grub_addr_t) get_physical_target_address (ch)) >> 4;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def392]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:61:9: warning[-Wanalyzer-infinite-loop]: infinite loop
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/i386/reboot.c:26: included_from: Included from here.
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-469): [#def393]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator.c: scope_hint: In function ‘grub_relocator32_boot’
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator.c:72:59: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator.c:87:48: note: in expansion of macro ‘RELOCATOR_SIZEOF’
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator.c:87:48: note: in expansion of macro ‘RELOCATOR_SIZEOF’
#   70|   extern struct grub_i386_idt grub_relocator16_idt;
#   71|   
#   72|-> #define RELOCATOR_SIZEOF(x)	(&grub_relocator##x##_end - &grub_relocator##x##_start)
#   73|   
#   74|   grub_err_t

Error: GCC_ANALYZER_WARNING (CWE-469): [#def394]
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator_common_c.c: scope_hint: In function ‘grub_cpu_relocator_init’
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator_common_c.c:42:59: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator_common_c.c:56:33: note: in expansion of macro ‘RELOCATOR_SIZEOF’
grub2-2.12-build/grub-2.12/grub-core/lib/i386/relocator_common_c.c:56:33: note: in expansion of macro ‘RELOCATOR_SIZEOF’
#   40|   extern grub_size_t grub_relocator_forward_chunk_size;
#   41|   
#   42|-> #define RELOCATOR_SIZEOF(x)	(&grub_relocator##x##_end - &grub_relocator##x##_start)
#   43|   
#   44|   grub_size_t grub_relocator_align = 1;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def395]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha1.c: scope_hint: In function ‘transform’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha1.c:142:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘x[1]’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha1.c:98:41: note: in definition of macro ‘R’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha1.c:264:7: note: in expansion of macro ‘TRANSFORM’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha1.c:264:7: note: in expansion of macro ‘TRANSFORM’
grub2-2.12-build/grub-2.12/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): [#def396]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha256.c:44: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha256.c: scope_hint: In function ‘transform’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘w[<unknown>]’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:12: note: in expansion of macro ‘S1’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/sha256.c:197:12: note: in expansion of macro ‘S1’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/cipher/bithelp.h:53:22: note: in definition of macro ‘ror’
grub2-2.12-build/grub-2.12/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): [#def397]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c: scope_hint: In function ‘gcry_mpi_set’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:90:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:303:26: note: in expansion of macro ‘mpi_get_nlimbs’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:304:3: note: in expansion of macro ‘RESIZE_IF_NEEDED’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c:307:3: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/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): [#def398]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:35: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c: scope_hint: In function ‘gcry_mpi_powm’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:90:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:36: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:105:3: note: in expansion of macro ‘count_leading_zeros’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:105:3: note: in expansion of macro ‘count_leading_zeros’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/src/mpi.h:38: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:160:7: note: in expansion of macro ‘gcry_assert’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:160:7: note: in expansion of macro ‘gcry_assert’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:162:24: note: in expansion of macro ‘mpi_alloc_limb_space’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:163:7: note: in expansion of macro ‘MPN_COPY’
grub2-2.12-build/grub-2.12/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): [#def399]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c:33: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpih-div.c: scope_hint: In function ‘_gcry_mpih_mod_1’
grub2-2.12-build/grub-2.12/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;                                     \
#      |                        ^~~
grub2-2.12-build/grub-2.12/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): [#def400]
grub2-2.12-build/grub-2.12/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
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/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): [#def401]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpicoder.c: scope_hint: In function ‘do_get_buffer’
grub2-2.12-build/grub-2.12/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): [#def402]
grub2-2.12-build/grub-2.12/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): [#def403]
grub2-2.12-build/grub-2.12/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): [#def404]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:35: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c: scope_hint: In function ‘gcry_mpi_powm’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘expo’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/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): [#def405]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘mod’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:75:10: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-pow.c:74:10: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/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): [#def406]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘u’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:129:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/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): [#def407]
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-internal.h:54: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:32: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c: scope_hint: In function ‘gcry_mpi_mul’
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/src/mpi.h:110:31: warning[-Wanalyzer-deref-before-check]: check of ‘v’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/grub-core/lib/libgcrypt-grub/mpi/mpi-mul.c:125:19: note: in expansion of macro ‘mpi_is_secure’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-835): [#def408]
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/parser_aux.c: scope_hint: In function ‘_asn1_set_default_tag’
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/parser_aux.c:1158:19: warning[-Wanalyzer-infinite-loop]: infinite loop
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/parser_aux.c:24: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/sys/types.h:24: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/string.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/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): [#def409]
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/structure.c: scope_hint: In function ‘_asn1_copy_structure3’
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/structure.c:443:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p_d’
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/sys/types.h:24: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/string.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/libtasn1/lib/int.h:29: included_from: Included from here.
grub2-2.12-build/grub-2.12/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): [#def410]
grub2-2.12-build/grub-2.12/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): [#def411]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:26: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/stdlib.h: scope_hint: In function ‘realloc’
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/stdlib.h:52:10: warning[-Wanalyzer-malloc-leak]: leak of ‘new_array’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:30:1: note: in expansion of macro ‘__libc_dynarray_emplace_enlarge’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/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): [#def412]
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:66: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_private.h:32: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_dec_lzma2.c:24: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/stdlib.h: scope_hint: In function ‘realloc’
grub2-2.12-build/grub-2.12/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): [#def413]
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h:30: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:71: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/wchar.h: scope_hint: In function ‘mbrtowc’
grub2-2.12-build/grub-2.12/grub-core/lib/posix_wrap/wchar.h:63:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*ptr’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:75: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.h:449:27: note: in definition of macro ‘MAX’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regexec.c:3960:41: note: in expansion of macro ‘MIN’
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex.c:73: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/gnulib/regex_internal.c:382:18: note: in expansion of macro ‘__mbrtowc’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-469): [#def414]
grub2-2.12-build/grub-2.12/grub-core/lib/x86_64/efi/relocator.c: scope_hint: In function ‘grub_relocator64_efi_boot’
grub2-2.12-build/grub-2.12/grub-core/lib/x86_64/efi/relocator.c:39:59: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/lib/x86_64/efi/relocator.c:54:48: note: in expansion of macro ‘RELOCATOR_SIZEOF’
grub2-2.12-build/grub-2.12/grub-core/lib/x86_64/efi/relocator.c:54:48: note: in expansion of macro ‘RELOCATOR_SIZEOF’
#   37|   extern grub_uint8_t grub_relocator64_efi_end;
#   38|   
#   39|-> #define RELOCATOR_SIZEOF(x)	(&grub_relocator##x##_end - &grub_relocator##x##_start)
#   40|   
#   41|   grub_err_t

Error: GCC_ANALYZER_WARNING (CWE-131): [#def415]
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_dec_stream.c: scope_hint: In function ‘dec_stream_header’
grub2-2.12-build/grub-2.12/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
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_dec_stream.c:24: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/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): [#def416]
grub2-2.12-build/grub-2.12/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
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/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): [#def417]
grub2-2.12-build/grub-2.12/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
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/grub-core/lib/xzembed/xz_config.h:68:37: note: in definition of macro ‘kmalloc’
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING (CWE-563): [#def418]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_start_image’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:65:29: warning[-Wunused-but-set-variable]: variable ‘b’ set but not used
#   65 |   grub_efi_boot_services_t *b;
#      |                             ^
#   63|   grub_start_image (grub_efi_handle_t handle)
#   64|   {
#   65|->   grub_efi_boot_services_t *b;
#   66|     grub_efi_status_t status;
#   67|     grub_efi_uintn_t exit_data_size;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def419]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘make_file_path’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:229:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘d’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:33: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:222:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’
grub2-2.12-build/grub-2.12/include/grub/file.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/loader.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:142:12: note: in expansion of macro ‘grub_error’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:228:7: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’
grub2-2.12-build/grub-2.12/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: [#def420]
grub2-2.12-build/grub-2.12/include/grub/disk.h:31: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/file.h:26: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/loader.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘handle_image’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:830:26: warning[-Wformat=]: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘grub_efi_status_t’ {aka ‘unsigned int’}
#  830 |   grub_dprintf ("chain", "entry_point returned %ld\n", efi_status);
#      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~
#      |                                                        |
#      |                                                        grub_efi_status_t {aka unsigned int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:830:50: note: format string is defined here
#  830 |   grub_dprintf ("chain", "entry_point returned %ld\n", efi_status);
#      |                                                ~~^
#      |                                                  |
#      |                                                  long int
#      |                                                %d
#  828|                               grub_efi_system_table);
#  829|   
#  830|->   grub_dprintf ("chain", "entry_point returned %ld\n", efi_status);
#  831|     grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t));
#  832|     efi_status = b->free_pool (buffer);

Error: COMPILER_WARNING (CWE-563): [#def421]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_load_image’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:866:29: warning[-Wunused-but-set-variable]: variable ‘b’ set but not used
#  866 |   grub_efi_boot_services_t *b;
#      |                             ^
#  864|   		grub_efi_handle_t *image_handle_out)
#  865|   {
#  866|->   grub_efi_boot_services_t *b;
#  867|     grub_efi_status_t status;
#  868|     grub_efi_loaded_image_t *loaded_image;

Error: COMPILER_WARNING: [#def422]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_cmd_chainloader’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:1085:22: warning[-Wformat=]: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘grub_ssize_t’ {aka ‘int’}
# 1085 |   grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n",
#      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1086 |                (void *)(grub_addr_t)address, fsize, 0llu);
#      |                                              ~~~~~
#      |                                              |
#      |                                              grub_ssize_t {aka int}
grub2-2.12-build/grub-2.12/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__)
#      |                                                                                        ^~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:1085:52: note: format string is defined here
# 1085 |   grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n",
#      |                                                  ~~^
#      |                                                    |
#      |                                                    long unsigned int
#      |                                                  %u
# 1083|      * in doing anything but clearing the protection bits here.
# 1084|      */
# 1085|->   grub_dprintf("nx", "setting attributes for %p (%lu bytes) to %llx\n",
# 1086|   	       (void *)(grub_addr_t)address, fsize, 0llu);
# 1087|     grub_update_mem_attrs (address, fsize,

Error: COMPILER_WARNING (CWE-563): [#def423]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/linux.c: scope_hint: In function ‘grub_cmd_linux’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/linux.c:727:7: warning[-Wunused-variable]: unused variable ‘nx_supported’
#  727 |   int nx_supported = 1;
#      |       ^~~~~~~~~~~~
#  725|     void *kernel = NULL;
#  726|     grub_err_t err;
#  727|->   int nx_supported = 1;
#  728|     int nx_required = 0;
#  729|   

Error: GCC_ANALYZER_WARNING (CWE-469): [#def424]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c: scope_hint: In function ‘preboot’
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:71:37: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:22: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:67:3: note: in expansion of macro ‘grub_dprintf’
#   69|     hookmmapcur = hookmmap = (struct grub_e820_mmap_entry *)
#   70|       ((grub_uint8_t *) hooktarget + (&grub_machine_mmaphook_end
#   71|-> 				    - &grub_machine_mmaphook_start));
#   72|   
#   73|     grub_mmap_iterate (fill_hook, &hookmmapcur);

Error: GCC_ANALYZER_WARNING (CWE-469): [#def425]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:95:43: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:67:3: note: in expansion of macro ‘grub_dprintf’
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:26:34: note: in definition of macro ‘min’
#   93|     /* Install the interrupt handlers. */
#   94|     grub_memcpy (hooktarget, &grub_machine_mmaphook_start,
#   95|-> 	       &grub_machine_mmaphook_end - &grub_machine_mmaphook_start);
#   96|   
#   97|     *((grub_uint16_t *) grub_absolute_pointer (0x4a)) = ((grub_addr_t) hooktarget) >> 4;

Error: GCC_ANALYZER_WARNING (CWE-469): [#def426]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:100:5: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:67:3: note: in expansion of macro ‘grub_dprintf’
#   98|     *((grub_uint16_t *) grub_absolute_pointer (0x56)) = ((grub_addr_t) hooktarget) >> 4;
#   99|     *((grub_uint16_t *) grub_absolute_pointer (0x48)) = &grub_machine_mmaphook_int12
#  100|->     - &grub_machine_mmaphook_start;
#  101|     *((grub_uint16_t *) grub_absolute_pointer (0x54)) = &grub_machine_mmaphook_int15
#  102|       - &grub_machine_mmaphook_start;

Error: GCC_ANALYZER_WARNING (CWE-469): [#def427]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:102:5: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:67:3: note: in expansion of macro ‘grub_dprintf’
#  100|       - &grub_machine_mmaphook_start;
#  101|     *((grub_uint16_t *) grub_absolute_pointer (0x54)) = &grub_machine_mmaphook_int15
#  102|->     - &grub_machine_mmaphook_start;
#  103|   
#  104|     return GRUB_ERR_NONE;

Error: GCC_ANALYZER_WARNING (CWE-469): [#def428]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c: scope_hint: In function ‘malloc_hook’
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:159:41: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:142:3: note: in expansion of macro ‘grub_dprintf’
#  157|       }
#  158|   
#  159|->   hooksize = &grub_machine_mmaphook_end - &grub_machine_mmaphook_start
#  160|       + regcount * sizeof (struct grub_e820_mmap_entry);
#  161|     /* Allocate an integer number of KiB. */

Error: GCC_ANALYZER_WARNING (CWE-469): [#def429]
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:164:34: warning[-Wanalyzer-undefined-behavior-ptrdiff]: undefined behavior when subtracting pointers
grub2-2.12-build/grub-2.12/grub-core/mmap/i386/pc/mmap.c:142:3: note: in expansion of macro ‘grub_dprintf’
#  162|     hooksize = ((hooksize - 1) | 0x3ff) + 1;
#  163|     slots_available = (hooksize - (&grub_machine_mmaphook_end
#  164|-> 				 - &grub_machine_mmaphook_start))
#  165|       / sizeof (struct grub_e820_mmap_entry);
#  166|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
grub2-2.12-build/grub-2.12/grub-core/net/bootp.c: scope_hint: In function ‘dissect_url’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def431]
grub2-2.12-build/grub-2.12/grub-core/net/efi/dhcp.c: scope_hint: In function ‘grub_cmd_efi_bootp6’
grub2-2.12-build/grub-2.12/grub-core/net/efi/dhcp.c:379:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘options’
#  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-465): [#def432]
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_config_from_device_path’
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c:311:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/include/grub/net.h:104: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c:1: included_from: Included from here.
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-465): [#def433]
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_boot_from_https’
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c:1336:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/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): [#def434]
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c: scope_hint: In function ‘grub_efi_net_boot_from_opa’
grub2-2.12-build/grub-2.12/grub-core/net/efi/net.c:1369:10: warning[-Wanalyzer-deref-before-check]: check of ‘dp’ for NULL after already dereferencing it
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def435]
grub2-2.12-build/grub-2.12/grub-core/normal/term.c: scope_hint: In function ‘putglyph’
grub2-2.12-build/grub-2.12/grub-core/normal/term.c:477:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/include/grub/term.h:73: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/normal/term.c:19: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/term.h:326:38: note: in expansion of macro ‘FOR_LIST_ELEMENTS’
grub2-2.12-build/grub-2.12/grub-core/normal/term.c:1088:3: note: in expansion of macro ‘FOR_ACTIVE_TERM_OUTPUTS’
grub2-2.12-build/grub-2.12/include/grub/term.h:72: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/unicode.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-688): [#def436]
grub2-2.12-build/grub-2.12/grub-core/osdep/getroot.c:2: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c: scope_hint: In function ‘get_btrfs_subvol’
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:446: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
#  444|         old = ret;
#  445|         ret = malloc (len + 1);
#  446|->       memcpy (ret, br->name, len);
#  447|         ret[len] = '\0';
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def437]
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c: scope_hint: In function ‘grub_util_get_raid_grub_dev’
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:1101: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
# 1099|         p = strdup (os_dev + sizeof ("/dev/md_d") - 1);
# 1100|   
# 1101|->       q = strchr (p, 'p');
# 1102|         if (q)
# 1103|   	*q = ',';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def438]
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:1116: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
# 1114|         p = strdup (os_dev + sizeof ("/dev/md/d") - 1);
# 1115|   
# 1116|->       q = strchr (p, 'p');
# 1117|         if (q)
# 1118|   	*q = ',';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def439]
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:1129: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
# 1127|         p = strdup (os_dev + sizeof ("/dev/md") - 1);
# 1128|   
# 1129|->       q = strchr (p, 'p');
# 1130|         if (q)
# 1131|   	*q = ',';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def440]
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:1142: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
# 1140|         p = strdup (os_dev + sizeof ("/dev/md/") - 1);
# 1141|   
# 1142|->       q = strchr (p, 'p');
# 1143|         if (q)
# 1144|   	*q = ',';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def441]
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/getroot.c:1156: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
# 1154|         p = strdup (os_dev + sizeof ("/dev/md/") - 1);
# 1155|   
# 1156|->       q = strchr (p, 'p');
# 1157|         if (q)
# 1158|   	*q = ',';

Error: GCC_ANALYZER_WARNING (CWE-688): [#def442]
grub2-2.12-build/grub-2.12/grub-core/osdep/ofpath.c:2: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/osdep/linux/ofpath.c: scope_hint: In function ‘strip_trailing_digits’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-775): [#def443]
grub2-2.12-build/grub-2.12/grub-core/osdep/password.c:4: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/osdep/unix/password.c: scope_hint: In function ‘grub_password_get’
grub2-2.12-build/grub-2.12/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): [#def444]
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-457): [#def445]
grub2-2.12-build/grub-2.12/grub-core/partmap/acorn.c: scope_hint: In function ‘acorn_partition_map_iterate’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def446]
grub2-2.12-build/grub-2.12/grub-core/term/efi/console.c: scope_hint: In function ‘grub_console_putchar’
grub2-2.12-build/grub-2.12/grub-core/term/efi/console.c:186:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
grub2-2.12-build/grub-2.12/include/grub/term.h:72: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-core/term/efi/console.c:19: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/unicode.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’
grub2-2.12-build/grub-2.12/include/grub/unicode.h:275:12: note: in expansion of macro ‘NULL’
#  184|     for (i = 0; i < c->ncomb && j + 1 < ARRAY_SIZE (str); i++)
#  185|       if (c->base < 0xffff)
#  186|->       str[j++] = grub_unicode_get_comb (c)[i].code;
#  187|     str[j] = 0;
#  188|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def447]
grub2-2.12-build/grub-2.12/grub-core/tests/lib/test.c: scope_hint: In function ‘failure_append_vtext’
grub2-2.12-build/grub-2.12/grub-core/tests/lib/test.c:85:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘failure’
grub2-2.12-build/grub-2.12/grub-core/tests/lib/test.c:19: included_from: Included from here.
grub2-2.12-build/grub-2.12/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: COMPILER_WARNING: [#def448]
grub2-2.12-build/grub-2.12/include/grub/compiler-rt-emu.h:23: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/symlist.h:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1174:10: warning: "_GL_INLINE_HEADER_BEGIN" redefined
# 1174 | # define _GL_INLINE_HEADER_BEGIN
#      |          ^~~~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/symlist.h:1: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:140:13: note: this is the location of the previous definition
#  140 | #    define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push")     \
#      |             ^~~~~~~~~~~~~~~~~~~~~~~
# 1172|       _Pragma ("GCC diagnostic pop")
# 1173|   #else
# 1174|-> # define _GL_INLINE_HEADER_BEGIN
# 1175|   # define _GL_INLINE_HEADER_END
# 1176|   #endif

Error: COMPILER_WARNING: [#def449]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1175:10: warning: "_GL_INLINE_HEADER_END" redefined
# 1175 | # define _GL_INLINE_HEADER_END
#      |          ^~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:143:13: note: this is the location of the previous definition
#  143 | #    define _GL_INLINE_HEADER_END   _Pragma ("GCC diagnostic pop")
#      |             ^~~~~~~~~~~~~~~~~~~~~
# 1173|   #else
# 1174|   # define _GL_INLINE_HEADER_BEGIN
# 1175|-> # define _GL_INLINE_HEADER_END
# 1176|   #endif
# 1177|   

Error: COMPILER_WARNING: [#def450]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1541:10: warning: "_GL_GNUC_PREREQ" redefined
# 1541 | # define _GL_GNUC_PREREQ(major, minor) \
#      |          ^~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:114:13: note: this is the location of the previous definition
#  114 | #    define _GL_GNUC_PREREQ GNUC_PREREQ
#      |             ^~~~~~~~~~~~~~~
# 1539|   /* True if the compiler says it groks GNU C version MAJOR.MINOR.  */
# 1540|   #if defined __GNUC__ && defined __GNUC_MINOR__
# 1541|-> # define _GL_GNUC_PREREQ(major, minor) \
# 1542|       ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
# 1543|   #else

Error: COMPILER_WARNING: [#def451]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1727:11: warning: "_GL_ATTRIBUTE_COLD" redefined
# 1727 | #  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
#      |           ^~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:89:13: note: this is the location of the previous definition
#   89 | #    define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
#      |             ^~~~~~~~~~~~~~~~~~
# 1725|   #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
# 1726|   # ifndef __SUNPRO_C
# 1727|-> #  define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
# 1728|   # else
# 1729|   #  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))

Error: COMPILER_WARNING: [#def452]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1743:10: warning: "_GL_ATTRIBUTE_CONST" redefined
# 1743 | # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
#      |          ^~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:90:13: note: this is the location of the previous definition
#   90 | #    define _GL_ATTRIBUTE_CONST __attribute__ ((const))
#      |             ^~~~~~~~~~~~~~~~~~~
# 1741|   /* Applies to: functions.  */
# 1742|   #if _GL_HAS_ATTRIBUTE (const)
# 1743|-> # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
# 1744|   #else
# 1745|   # define _GL_ATTRIBUTE_CONST

Error: COMPILER_WARNING: [#def453]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1755:10: warning: "_GL_ATTRIBUTE_DEALLOC" redefined
# 1755 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
#      |          ^~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:91:13: note: this is the location of the previous definition
#   91 | #    define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i)))
#      |             ^~~~~~~~~~~~~~~~~~~~~
# 1753|   /* Applies to: functions.  Cannot be used on inline functions.  */
# 1754|   #if _GL_GNUC_PREREQ (11, 0)
# 1755|-> # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
# 1756|   #else
# 1757|   # define _GL_ATTRIBUTE_DEALLOC(f, i)

Error: COMPILER_WARNING: [#def454]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1775:10: warning: "_GL_ATTRIBUTE_DEPRECATED" redefined
# 1775 | # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:93:13: note: this is the location of the previous definition
#   93 | #    define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~
# 1773|      in C++ also: namespace, class, template specialization.  */
# 1774|   #if _GL_HAS_C_ATTRIBUTE (deprecated)
# 1775|-> # define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
# 1776|   #elif _GL_HAS_ATTRIBUTE (deprecated)
# 1777|   # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))

Error: COMPILER_WARNING: [#def455]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1813:10: warning: "_GL_ATTRIBUTE_FALLTHROUGH" redefined
# 1813 | # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:121:15: note: this is the location of the previous definition
#  121 | #      define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
#      |               ^~~~~~~~~~~~~~~~~~~~~~~~~
# 1811|   /* Always expands to something.  */
# 1812|   #if _GL_HAS_C_ATTRIBUTE (fallthrough)
# 1813|-> # define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
# 1814|   #elif _GL_HAS_ATTRIBUTE (fallthrough)
# 1815|   # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))

Error: COMPILER_WARNING: [#def456]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1852:10: warning: "_GL_ATTRIBUTE_MALLOC" redefined
# 1852 | # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
#      |          ^~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:99:13: note: this is the location of the previous definition
#   99 | #    define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc))
#      |             ^~~~~~~~~~~~~~~~~~~~
# 1850|   /* Applies to: functions.  */
# 1851|   #if _GL_HAS_ATTRIBUTE (malloc)
# 1852|-> # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
# 1853|   #else
# 1854|   # define _GL_ATTRIBUTE_MALLOC

Error: COMPILER_WARNING: [#def457]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1881:10: warning: "_GL_ATTRIBUTE_MAYBE_UNUSED" redefined
# 1881 | # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:100:13: note: this is the location of the previous definition
#  100 | #    define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1879|      clang supports both syntaxes.  */
# 1880|   #if _GL_HAS_C_ATTRIBUTE (maybe_unused)
# 1881|-> # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# 1882|   #else
# 1883|   # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED

Error: COMPILER_WARNING: [#def458]
grub2-2.12-build/grub-2.12/grub-emu-2.12/config-util.h:1895:10: warning: "_GL_ATTRIBUTE_NODISCARD" redefined
# 1895 | # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
#      |          ^~~~~~~~~~~~~~~~~~~~~~~
grub2-2.12-build/grub-2.12/grub-emu-2.12/config.h:102:13: note: this is the location of the previous definition
#  102 | #    define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
#      |             ^~~~~~~~~~~~~~~~~~~~~~~
# 1893|   /* Applies to: function, enumeration, class.  */
# 1894|   #if _GL_HAS_C_ATTRIBUTE (nodiscard)
# 1895|-> # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# 1896|   #elif _GL_HAS_ATTRIBUTE (warn_unused_result)
# 1897|   # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))

Error: GCC_ANALYZER_WARNING (CWE-457): [#def459]
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-emu-2.12/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): [#def460]
grub2-2.12-build/grub-2.12/grub-emu-2.12/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): [#def461]
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-emu-2.12/grub-core/grub_script.yy.c:52: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-emu-2.12/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): [#def462]
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/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): [#def463]
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/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): [#def464]
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.yy.c:52: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’
grub2-2.12-build/grub-2.12/grub-i386-efi-2.12/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): [#def465]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def466]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def467]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.yy.c:52: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def468]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def469]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def470]
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-i386-pc-2.12/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): [#def471]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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): [#def472]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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): [#def473]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.yy.c:52: included_from: Included from here.
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/grub_script.yy.c:2211:3: note: in expansion of macro ‘memset’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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): [#def474]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c: scope_hint: In function ‘grub_script_yyparse’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:496:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:1111:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.tab.c:481:9: note: in expansion of macro ‘YYCOPY’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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): [#def475]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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): [#def476]
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.yy.c: scope_hint: In function ‘yy_init_buffer’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub_script.yy.c:2091:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/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-476): [#def477]
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c: scope_hint: In function ‘grub_efi_get_media_file_path’
grub2-2.12-build/grub-2.12/include/grub/efi/api.h:719:54: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dp’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:523:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:532:12: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’
grub2-2.12-build/grub-2.12/include/grub/efi/api.h:722:66: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_LENGTH’
grub2-2.12-build/grub-2.12/include/grub/efi/api.h:737:4: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_VALID’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:532:12: note: in expansion of macro ‘GRUB_EFI_NEXT_DEVICE_PATH’
grub2-2.12-build/grub-2.12/grub-core/loader/efi/chainloader.c:523:31: note: in expansion of macro ‘GRUB_EFI_DEVICE_PATH_TYPE’
#  717|   typedef struct grub_efi_device_path grub_efi_device_path_protocol_t;
#  718|   
#  719|-> #define GRUB_EFI_DEVICE_PATH_TYPE(dp)		((dp)->type & 0x7f)
#  720|   #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp)	((dp)->subtype)
#  721|   #define GRUB_EFI_DEVICE_PATH_LENGTH(dp)		((dp)->length)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def478]
grub2-2.12-build/grub-2.12/grub-core/commands/nativedisk.c:20: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/misc.h: scope_hint: In function ‘grub_strcasecmp’
grub2-2.12-build/grub-2.12/include/grub/misc.h:221:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s1’
grub2-2.12-build/grub-2.12/grub-core/commands/nativedisk.c:148:3: note: in expansion of macro ‘grub_dprintf’
grub2-2.12-build/grub-2.12/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: GCC_ANALYZER_WARNING (CWE-688): [#def479]
grub2-2.12-build/grub-2.12/include/grub/osdep/hostfile.h:6: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/emu/hostfile.h:26: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/util/install.h:27: included_from: Included from here.
grub2-2.12-build/grub-2.12/util/grub-install-common.c:36: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/osdep/hostfile_unix.h: scope_hint: In function ‘grub_util_fd_readdir’
grub2-2.12-build/grub-2.12/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.
grub2-2.12-build/grub-2.12/grub-x86_64-efi-2.12/grub-core/lib/gnulib/stdio.h:43: included_from: Included from here.
grub2-2.12-build/grub-2.12/include/grub/emu/misc.h:25: included_from: Included from here.
grub2-2.12-build/grub-2.12/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): [#def480]
grub2-2.12-build/grub-2.12/util/grub-fstest.c: scope_hint: In function ‘fstest’
grub2-2.12-build/grub-2.12/util/grub-fstest.c:400:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  398|   	grub_util_error ("%s", grub_errmsg);
#  399|   
#  400|->       host_file = grub_xasprintf ("(host)%s", images[i]);
#  401|         if (!host_file)
#  402|   	grub_util_error ("%s", grub_errmsg);

Error: COMPILER_WARNING (CWE-195): [#def481]
grub2-2.12-build/grub-2.12/util/grub-mkfont.c:42: included_from: Included from here.
grub2-2.12-build/grub-2.12/util/grub-mkfont.c: scope_hint: In function ‘process_cursive’
grub2-2.12-build/grub-2.12/util/grub-mkfont.c:73:32: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’
#   73 |     assert ((sz) >= 0 && ((sz) <= ((end) - (grub_uint8_t *) (a)) / sizeof (*(a))))
#      |                                ^~
grub2-2.12-build/grub-2.12/util/grub-mkfont.c:506:3: note: in expansion of macro ‘GSUB_ARRAY_SIZE_VALID’
#  506 |   GSUB_ARRAY_SIZE_VALID (feature->lookupindices, lookup_count, gsub_end);
#      |   ^~~~~~~~~~~~~~~~~~~~~
#   71|   
#   72|   #define GSUB_ARRAY_SIZE_VALID(a, sz, end) \
#   73|->     assert ((sz) >= 0 && ((sz) <= ((end) - (grub_uint8_t *) (a)) / sizeof (*(a))))
#   74|   
#   75|   struct grub_glyph_info

Error: COMPILER_WARNING (CWE-195): [#def482]
grub2-2.12-build/grub-2.12/util/setup_sparc.c:2: included_from: Included from here.
grub2-2.12-build/grub-2.12/util/setup.c: scope_hint: In function ‘grub_util_sparc_setup’
grub2-2.12-build/grub-2.12/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,

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-123.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namegrub2-2.12-10.fc42
store-results-to/tmp/tmp3zg3lcfo/grub2-2.12-10.fc42.tar.xz
time-created2024-11-13 00:37:31
time-finished2024-11-13 00:57:59
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp3zg3lcfo/grub2-2.12-10.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp3zg3lcfo/grub2-2.12-10.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9