Skip to content

Commit 7741cd8

Browse files
committed
mca_base_var.c: clear flags appropriately
Fix an incorrect assignment of flags: flags_derived is meant to hold flags of type mca_base_var_syn_flag_t (i.e., synonym flags), whereas flags holds flags of type mca_base_var_flag_t (i.e., regular flags). These are two different types of flags, and are not intended to be mixed. Hence, initialize the per-variable synonym flags to 0 -- do *not* initialize them to the value of the regular flags. Signed-off-by: Jeff Squyres <jeff@squyres.com>
1 parent f848448 commit 7741cd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opal/mca/base/mca_base_var.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
2525
* Copyright (c) 2022 Computer Architecture and VLSI Systems (CARV)
2626
* Laboratory, ICS Forth. All rights reserved.
27+
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
2728
* $COPYRIGHT$
2829
*
2930
* Additional copyrights may follow
@@ -1547,7 +1548,7 @@ int mca_base_var_register(const char *project_name, const char *framework_name,
15471548
}
15481549

15491550
OPAL_LIST_FOREACH_DECL(alias_item, &alias->component_aliases, mca_base_alias_item_t) {
1550-
mca_base_var_syn_flag_t flags_derived = flags;
1551+
mca_base_var_syn_flag_t flags_derived = 0;
15511552
if (alias_item->alias_flags & MCA_BASE_ALIAS_FLAG_DEPRECATED) {
15521553
flags_derived = MCA_BASE_VAR_SYN_FLAG_DEPRECATED;
15531554
}

0 commit comments

Comments
 (0)