Task #118752 - debugedit-5.3-2.fc45/scan-results.err

back to task #118752
download
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:354:23: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
#  352|   # RPM_ARCH to create an unique (dir) name. Warn if they aren't set.
#  353|   for n in RPM_BUILD_ROOT RPM_BUILD_DIR RPM_PACKAGE_NAME; do
#  354|->   if eval test -z \"\${$n-}\"; then
#  355|       echo >&2 "$n is not set"
#  356|       exit 1

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:354:27: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it.
#  352|   # RPM_ARCH to create an unique (dir) name. Warn if they aren't set.
#  353|   for n in RPM_BUILD_ROOT RPM_BUILD_DIR RPM_PACKAGE_NAME; do
#  354|->   if eval test -z \"\${$n-}\"; then
#  355|       echo >&2 "$n is not set"
#  356|       exit 1

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:393:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  391|   
#  392|   mkdir -p "$OUTDIR"
#  393|-> > "$SOURCEFILE"
#  394|   > "$LISTFILE"
#  395|   > "$LINKSFILE"

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:394:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  392|   mkdir -p "$OUTDIR"
#  393|   > "$SOURCEFILE"
#  394|-> > "$LISTFILE"
#  395|   > "$LINKSFILE"
#  396|   > "$ELFBINSFILE"

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:395:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  393|   > "$SOURCEFILE"
#  394|   > "$LISTFILE"
#  395|-> > "$LINKSFILE"
#  396|   > "$ELFBINSFILE"
#  397|   

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:396:1: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  394|   > "$LISTFILE"
#  395|   > "$LINKSFILE"
#  396|-> > "$ELFBINSFILE"
#  397|   
#  398|   debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:422:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  420|     local binary="$2"
#  421|   
#  422|->   local dynsyms=`mktemp`
#  423|     local funcsyms=`mktemp`
#  424|     local keep_symbols=`mktemp`

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:423:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  421|   
#  422|     local dynsyms=`mktemp`
#  423|->   local funcsyms=`mktemp`
#  424|     local keep_symbols=`mktemp`
#  425|     local mini_debuginfo=`mktemp`

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:424:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  422|     local dynsyms=`mktemp`
#  423|     local funcsyms=`mktemp`
#  424|->   local keep_symbols=`mktemp`
#  425|     local mini_debuginfo=`mktemp`
#  426|   

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:425:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  423|     local funcsyms=`mktemp`
#  424|     local keep_symbols=`mktemp`
#  425|->   local mini_debuginfo=`mktemp`
#  426|   
#  427|     # In the minisymtab we don't need the .debug_ sections (already removed

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:433:9: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  431|     # too aggressive. Field $2 is the section name, $3 is the section type
#  432|     # and $8 are the section flags.
#  433|->   local remove_sections=`${READELF} -W -S "$debuginfo" \
#  434|   	| awk '{ if (index($2,".debug_") != 1 \
#  435|   		     && ($3 == "PROGBITS" || $3 == "NOTE" || $3 == "NOBITS") \

Error: SHELLCHECK_WARNING (CWE-398):
/usr/bin/find-debuginfo:532:12: warning[SC2229]: This does not read 'var'. Remove $/${} for that, or use ${var?} to quiet.
#  530|         continue
#  531|       else
#  532|->       read "$var" < <(echo 1)
#  533|       fi
#  534|     fi

Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/find-debuginfo:546:9: warning[SC2034]: issue appears unused. Verify use (or export if used externally).
#  544|     local file="$2"
#  545|     local debug_opt="$3"
#  546|->   local issue
#  547|   
#  548|     if [ "$check_elf" = "true" ]; then

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:597:17: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  595|             $verbose && echo "considering ${f#$RPM_BUILD_DIR/} ${member} size ${size} at ${offset}"
#  596|             local tmpdir="$temp/$inum-archive-member" # super short lived
#  597|->           local member_dn=$(dirname "$member")
#  598|             if [ "$member_dn" = "." ]; then
#  599|                 member_dn="" # empty

Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/find-debuginfo:603:17: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  601|                 member_dn="${member_dn}/" # or suffixed with /
#  602|             fi
#  603|->           local member_bn=$(basename "$member")
#  604|   
#  605|             # (re)create a directory to hold the (pathname-inclusive) member

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:612:12: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  610|             # distinct instance-number would have to be given to ar ("N ###"),
#  611|             # kept on a per-name basis.
#  612|->           (cd "$tmpdir";
#  613|              if [ "$dd_skip_bytes" = "yes" ]; then
#  614|   	    # Use blocksize of 64k, skip and count are still in bytes.

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:641:12: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  639|   
#  640|             # add the file; qP mode, so strict append, no dupe elimination, path preserved
#  641|->           (cd "$tmpdir"; ${AR} qP "$tmpa"  "$member_dn$member_bn")
#  642|   
#  643|             # remove the entire temporary directory, in case another

Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/find-debuginfo:658:26: warning[SC2046]: Quote this to prevent word splitting.
#  656|     rm -f "$tmpa"
#  657|     
#  658|->   $verbose && echo found $(tr -dc '\0' < "$SOURCEFILE" | wc -c) source files
#  659|   
#  660|     do_check_elf "check AR file" "$f" "" || return 1

Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/find-debuginfo:728:26: warning[SC2046]: Quote this to prevent word splitting.
#  726|     fi
#  727|   
#  728|->   $verbose && echo found $(tr -dc '\0' < "$SOURCEFILE" | wc -c) source files
#  729|     
#  730|     # debugedit makes sure to to get write permission to the file and

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:837:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  835|     local res=0
#  836|   
#  837|->   >"$SOURCEFILE"
#  838|     >"$ELFBINSFILE"
#  839|     # can't use read -n <n>, because it reads bytes one by one, allowing for

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:838:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  836|   
#  837|     >"$SOURCEFILE"
#  838|->   >"$ELFBINSFILE"
#  839|     # can't use read -n <n>, because it reads bytes one by one, allowing for
#  840|     # races

Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/find-debuginfo:846:13: warning[SC2046]: Quote this to prevent word splitting.
#  844|         break
#  845|       fi
#  846|->     do_file $(sed -n "$(( 0x$filenum )) p" "$temp/primary")
#  847|       res=$?
#  848|       if [ $res != 0 ]; then

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:897:27: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  895|   if $run_dwz \
#  896|      && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
#  897|->   readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
#  898|     if [ ${#dwz_files[@]} -gt 0 ]; then
#  899|       $quiet || echo "DWARF-compressing ${#dwz_files[@]} files" 2>&1

Error: SHELLCHECK_WARNING:
/usr/bin/find-debuginfo:910:11: error[SC2157]: Argument to -n is always true due to literal strings.
#  908|       dwz_multifile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
#  909|       dwz_opts="-h -q -r"
#  910|->     [ -n "-j" ] && dwz_opts="${dwz_opts} -j ${n_jobs}"
#  911|       [ ${#dwz_files[@]} -gt 1 ] && [ "$dwz_single_file_mode" = "false" ] \
#  912|         && dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"

Error: SHELLCHECK_WARNING (CWE-88):
/usr/bin/find-debuginfo:919:63: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#  917|         && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}"
#  918|       if type dwz >/dev/null 2>&1; then
#  919|->       ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts ${dwz_files[@]} )
#  920|       else
#  921|         echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:931:6: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  929|       # dwz invalidates .gnu_debuglink CRC32 in the main files.
#  930|       cat "$ELFBINSFILE" |
#  931|->     (cd "$RPM_BUILD_ROOT"; \
#  932|        tr '\n' '\0' | xargs -0 sepdebugcrcfix usr/lib/debug)
#  933|     fi

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:967:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  965|     # directory (which is why we match against ^ or /).
#  966|     LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(^|/)<[a-z _-]+>$' |
#  967|->   (cd "${debug_base_name}"; cpio -pd0mL --quiet "${RPM_BUILD_ROOT}${debug_dest_name}")
#  968|     # stupid cpio creates new directories in mode 0700,
#  969|     # and non-standard modes may be inherented from original directories, fixup

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:977:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  975|     ((nout > 0)) ||
#  976|     test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
#  977|->   (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
#  978|     sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
#  979|   

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:980:4: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  978|     sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
#  979|   
#  980|->   (cd "${RPM_BUILD_ROOT}/usr"
#  981|      test ! -d lib/debug || find lib/debug ! -type d
#  982|      test ! -d src/debug -o -n "$srcout" || find src/debug -mindepth 1 -maxdepth 1

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:988:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#  986|   if [ -n "$srcout" ]; then
#  987|     srcout="$OUTDIR/$srcout"
#  988|->   > "$srcout"
#  989|     if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
#  990|       (cd "${RPM_BUILD_ROOT}/usr"

Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/find-debuginfo:990:6: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  988|     > "$srcout"
#  989|     if [ -d "${RPM_BUILD_ROOT}/usr/src/debug" ]; then
#  990|->     (cd "${RPM_BUILD_ROOT}/usr"
#  991|        find src/debug -mindepth 1 -maxdepth 1
#  992|       ) | sed 's,^,/usr/,' >> "$srcout"

Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/find-debuginfo:1043:3: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
# 1041|   i=0
# 1042|   while ((i < nout)); do
# 1043|->   > ${outs[$i]}
# 1044|     filtered_list ${outs[$i]} ${lists[$i]}
# 1045|     pattern_list ${outs[$i]} "${ptns[$i]}"

Error: GCC_ANALYZER_WARNING (CWE-457):
debugedit-5.3/tools/debugedit.c:3666:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*dso.filename’
debugedit-5.3/tools/debugedit.c:3805:1: enter_function: entry to ‘main’
debugedit-5.3/tools/debugedit.c:3867:6: branch_false: following ‘false’ branch...
debugedit-5.3/tools/debugedit.c:3873:17: branch_false: ...to here
debugedit-5.3/tools/debugedit.c:3873:6: branch_false: following ‘false’ branch...
debugedit-5.3/tools/debugedit.c:3879:7: branch_false: ...to here
debugedit-5.3/tools/debugedit.c:3911:6: branch_false: following ‘false’ branch...
debugedit-5.3/tools/debugedit.c:3916:7: branch_false: ...to here
debugedit-5.3/tools/debugedit.c:3916:6: branch_false: following ‘false’ branch...
debugedit-5.3/tools/debugedit.c:3922:20: branch_false: ...to here
debugedit-5.3/tools/debugedit.c:3929:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
debugedit-5.3/tools/debugedit.c:3934:9: branch_false: ...to here
debugedit-5.3/tools/debugedit.c:3934:9: call_function: calling ‘fdopen_dso’ from ‘main’
# 3664|     if (dso)
# 3665|       {
# 3666|->       free ((char *) dso->filename);
# 3667|         destroy_strings (&dso->debug_str);
# 3668|         destroy_strings (&dso->debug_line_str);