Skip to content

Commit 3ba00b5

Browse files
sibcsehaampie
authored andcommitted
compiler wrapper: ensure variables are declared (#2744)
Variables like `mode` where not initialized, so that ultimately `$mode` referenced to the environment variable instead of the local variable. Fix this class of issues for a couple local variables.
1 parent e6c498a commit 3ba00b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cc.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ fi
295295
# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations,
296296
# including version checks (SPACK_XFLAGS variants are not applied
297297
# for version checks).
298+
mode=""
299+
vdep=""
300+
lang_flags=""
301+
debug_flags=""
298302
command="${0##*/}"
299303
comp="CC"
300304
vcheck_flags=""

0 commit comments

Comments
 (0)