In /usr/bin/mpicc.mpich line 30:
prefix=/usr
^----^ SC2034: prefix appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 31:
exec_prefix=/usr
^---------^ SC2034: exec_prefix appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 45:
wl="-Wl,"
^-- SC2034: wl appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 48:
libext="a"
^----^ SC2034: libext appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 51:
shlibext="so"
^------^ SC2034: shlibext appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 54:
libname_spec="lib\$name"
^----------^ SC2034: libname_spec appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 57:
library_names_spec="\$libname\$shrext"
^----------------^ SC2034: library_names_spec appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 64:
hardcode_libdir_separator=""
^-----------------------^ SC2034: hardcode_libdir_separator appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 68:
hardcode_direct="no"
^-------------^ SC2034: hardcode_direct appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 72:
hardcode_minus_L="no"
^--------------^ SC2034: hardcode_minus_L appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 93:
    MPICH_CC_OLD="$CC"
    ^----------^ SC2034: MPICH_CC_OLD appears unused. Verify use (or export if used externally).


In /usr/bin/mpicc.mpich line 95:
    CCname=`echo $CC | sed 's/ /-/g'`
           ^------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
            ^----------------------^ SC2001: See if you can use ${variable//search/replace} instead.
                 ^-^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    CCname=$(echo "$CC" | sed 's/ /-/g')


In /usr/bin/mpicc.mpich line 96:
    if [ -s $sysconfdir/mpicc-$CCname.conf ] ; then
                              ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ -s $sysconfdir/mpicc-"$CCname".conf ] ; then


In /usr/bin/mpicc.mpich line 97:
        . $sysconfdir/mpicc-$CCname.conf
          ^----------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
                            ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        . $sysconfdir/mpicc-"$CCname".conf


In /usr/bin/mpicc.mpich line 147:
    CC=`echo A$arg | sed -e 's/A-cc=//g'`
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
              ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    CC=$(echo A"$arg" | sed -e 's/A-cc=//g')


In /usr/bin/mpicc.mpich line 152:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpicc.mpich line 156:
    CCname=`echo A$arg | sed -e 's/A-config=//g'`
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    CCname=$(echo A"$arg" | sed -e 's/A-config=//g')


In /usr/bin/mpicc.mpich line 158:
        . "$sysconfdir/mpicc-$CCname.conf"
          ^-- SC1090: Can't follow non-constant source. Use a directive to specify location.


In /usr/bin/mpicc.mpich line 165:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpicc.mpich line 170:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpicc.mpich line 185:
    profConf=`echo A$arg | sed -e 's/A-profile=//g'`
             ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                    ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    profConf=$(echo A"$arg" | sed -e 's/A-profile=//g')


In /usr/bin/mpicc.mpich line 195:
    NC=`echo "$CC" | sed 's%\/% %g' | awk '{print $NF}' -`
    ^-- SC2034: NC appears unused. Verify use (or export if used externally).
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    NC=$(echo "$CC" | sed 's%\/% %g' | awk '{print $NF}' -)


In /usr/bin/mpicc.mpich line 197:
        . $sysconfdir/mpixxx_opts.conf
          ^--------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In /usr/bin/mpicc.mpich line 201:
            . ./mpixxx_opts.conf
              ^----------------^ SC1091: Not following: ./mpixxx_opts.conf was not specified as input (see shellcheck -x).


In /usr/bin/mpicc.mpich line 212:
	unset allargs[$argno]
              ^-------------^ SC2184: Quote arguments to unset so they're not glob expanded.


In /usr/bin/mpicc.mpich line 215:
    argno=`expr $argno + 1`
          ^---------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
           ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].

Did you mean: 
    argno=$(expr $argno + 1)


In /usr/bin/mpicc.mpich line 233:
    if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
                                     ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /usr/bin/mpicc.mpich line 242:
    if [ -n "$profConffile" -a -s "$profConffile" ] ; then
                            ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.


In /usr/bin/mpicc.mpich line 243:
	. $profConffile
          ^-----------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
          ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	. "$profConffile"


In /usr/bin/mpicc.mpich line 275:
        eval rpath_flags=\"${hardcode_libdir_flag_spec}\"
                           ^--------------------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        eval rpath_flags=\""${hardcode_libdir_flag_spec}"\"


In /usr/bin/mpicc.mpich line 281:
        $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir
              ^-^ SC2086: Double quote to prevent globbing and word splitting.
                  ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                    ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                      ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                      ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        $Show "$CC" "${final_cppflags}" "$PROFILE_INCPATHS" "${final_cflags}" "${final_ldflags}" "${allargs[@]}" -I$includedir


In /usr/bin/mpicc.mpich line 285:
          $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -lmpich  $PROFILE_POSTLIB ${final_libs}
                ^-^ SC2086: Double quote to prevent globbing and word splitting.
                    ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                        ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                 ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                 ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                              ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                    ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                     ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
          $Show "$CC" "${final_cppflags}" "$PROFILE_INCPATHS" "${final_cflags}" "${final_ldflags}" "${allargs[@]}" -I$includedir -L$libdir "$PROFILE_PRELIB" "$PROFILE_FOO" "$rpath_flags" -lmpich  "$PROFILE_POSTLIB" "${final_libs}"


In /usr/bin/mpicc.mpich line 288:
          if [ "" = yes ] ; then
                  ^-- SC2050: This expression is constant. Did you forget the $ on a variable?


In /usr/bin/mpicc.mpich line 289:
              fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs $libdir/pkgconfig/libfabric.pc)


In /usr/bin/mpicc.mpich line 290:
              fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^-- SC2001: See if you can use ${variable//search/replace} instead.
                               ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
              fabric_dep=$(echo "$fabric_dep" | sed 's/-lfabric//')


In /usr/bin/mpicc.mpich line 292:
              fabric_dep=`pkg-config --static --libs yes/lib/pkgconfig/libfabric.pc`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs yes/lib/pkgconfig/libfabric.pc)


In /usr/bin/mpicc.mpich line 294:
              fabric_dep=`pkg-config --static --libs libfabric`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs libfabric)


In /usr/bin/mpicc.mpich line 296:
          $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} ${final_ldflags} "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a  $PROFILE_POSTLIB ${final_libs} ${fabric_dep}
                ^-^ SC2086: Double quote to prevent globbing and word splitting.
                    ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                        ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                 ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                 ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                              ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                             ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                              ^-----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                                            ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
          $Show "$CC" "${final_cppflags}" "$PROFILE_INCPATHS" "${final_cflags}" "${final_ldflags}" "${allargs[@]}" -I$includedir -L$libdir "$PROFILE_PRELIB" "$PROFILE_FOO" "$rpath_flags" $libdir/libmpi.a  "$PROFILE_POSTLIB" "${final_libs}" "${fabric_dep}"


In /usr/bin/mpicc.mpich line 301:
    $Show $CC ${final_cppflags} $PROFILE_INCPATHS ${final_cflags} "${allargs[@]}" -I$includedir
          ^-^ SC2086: Double quote to prevent globbing and word splitting.
              ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                  ^-------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    $Show "$CC" "${final_cppflags}" "$PROFILE_INCPATHS" "${final_cflags}" "${allargs[@]}" -I$includedir

For more information:
  https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source....
  https://www.shellcheck.net/wiki/SC2034 -- MPICH_CC_OLD appears unused. Veri...
  https://www.shellcheck.net/wiki/SC2050 -- This expression is constant. Did ...