Skip to content

Commit efc2516

Browse files
committed
symbol name pollution: making some vars static
As part of addressing symbol name pollution, I'm switching a few vars/functions to static. Signed-off-by: Mark Allen <[email protected]>
1 parent f0af463 commit efc2516

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

opal/dss/dss_open_close.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
1515
* Copyright (c) 2015 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
17+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1718
* $COPYRIGHT$
1819
*
1920
* Additional copyrights may follow
@@ -43,7 +44,7 @@ static opal_dss_buffer_type_t default_buf_type = OPAL_DSS_BUFFER_NON_DESC;
4344
/* variable group id */
4445
static int opal_dss_group_id = -1;
4546

46-
mca_base_var_enum_value_t buffer_type_values[] = {
47+
static mca_base_var_enum_value_t buffer_type_values[] = {
4748
{OPAL_DSS_BUFFER_NON_DESC, "non-described"},
4849
{OPAL_DSS_BUFFER_FULLY_DESC, "described"},
4950
{0, NULL}

opal/mca/base/mca_base_var.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -102,7 +103,7 @@ const size_t var_type_sizes[] = {
102103
sizeof (double)
103104
};
104105

105-
const char *var_source_names[] = {
106+
static const char *var_source_names[] = {
106107
"default",
107108
"command line",
108109
"environment",

opal/mca/base/mca_base_var_enum.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* reserved.
1616
* Copyright (c) 2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
18+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1819
* $COPYRIGHT$
1920
*
2021
* Additional copyrights may follow
@@ -40,7 +41,7 @@ OBJ_CLASS_INSTANCE(mca_base_var_enum_t, opal_object_t, mca_base_var_enum_constru
4041

4142
static void mca_base_var_enum_flag_constructor (mca_base_var_enum_flag_t *enumerator);
4243
static void mca_base_var_enum_flag_destructor (mca_base_var_enum_flag_t *enumerator);
43-
OBJ_CLASS_INSTANCE(mca_base_var_enum_flag_t, opal_object_t, mca_base_var_enum_flag_constructor,
44+
static OBJ_CLASS_INSTANCE(mca_base_var_enum_flag_t, opal_object_t, mca_base_var_enum_flag_constructor,
4445
mca_base_var_enum_flag_destructor);
4546

4647
static int enum_dump (mca_base_var_enum_t *self, char **out);

opal/mca/event/libevent2022/libevent/evutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ _evutil_weakrand(void)
21132113
* Volatile pointer to memset: we use this to keep the compiler from
21142114
* eliminating our call to memset.
21152115
*/
2116-
void * (*volatile evutil_memset_volatile_)(void *, int, size_t) = memset;
2116+
static void * (*volatile evutil_memset_volatile_)(void *, int, size_t) = memset;
21172117

21182118
void
21192119
evutil_memclear_(void *mem, size_t len)

opal/util/error.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Copyright (c) 2015 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
18+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1819
* $COPYRIGHT$
1920
*
2021
* Additional copyrights may follow
@@ -48,7 +49,7 @@ struct converter_info_t {
4849
typedef struct converter_info_t converter_info_t;
4950

5051
/* all default to NULL */
51-
converter_info_t converters[MAX_CONVERTERS] = {{0}};
52+
static converter_info_t converters[MAX_CONVERTERS] = {{0}};
5253

5354
static int
5455
opal_strerror_int(int errnum, const char **str)

orte/mca/ess/base/ess_base_std_orted.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
1616
* reserved.
1717
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
18+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1819
* $COPYRIGHT$
1920
*
2021
* Additional copyrights may follow
@@ -89,7 +90,7 @@ static opal_event_t int_handler;
8990
static opal_event_t epipe_handler;
9091
static opal_event_t sigusr1_handler;
9192
static opal_event_t sigusr2_handler;
92-
char *log_path = NULL;
93+
static char *log_path = NULL;
9394
static void shutdown_signal(int fd, short flags, void *arg);
9495
static void signal_callback(int fd, short flags, void *arg);
9596
static void epipe_signal_callback(int fd, short flags, void *arg);

orte/util/show_help.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
1414
* All rights reserved.
1515
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1617
* $COPYRIGHT$
1718
*
1819
* Additional copyrights may follow
@@ -83,7 +84,7 @@ typedef struct {
8384

8485
static void tuple_list_item_constructor(tuple_list_item_t *obj);
8586
static void tuple_list_item_destructor(tuple_list_item_t *obj);
86-
OBJ_CLASS_INSTANCE(tuple_list_item_t, opal_list_item_t,
87+
static OBJ_CLASS_INSTANCE(tuple_list_item_t, opal_list_item_t,
8788
tuple_list_item_constructor,
8889
tuple_list_item_destructor);
8990

0 commit comments

Comments
 (0)