Skip to content

Commit

Permalink
Minor changes to make gcc 8.1 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed May 26, 2018
1 parent a2d0030 commit 799c885
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/apex/apex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ profiler* resume(const std::string &timer_name) {
for (unsigned int i = 0 ; i < instance->listeners.size() ; i++) {
instance->listeners[i]->on_resume(tt_ptr);
}
} catch (disabled_profiler_exception e) {
} catch (disabled_profiler_exception &e) {
APEX_UTIL_REF_COUNT_FAILED_RESUME
return profiler::get_disabled_profiler();
}
Expand Down Expand Up @@ -681,7 +681,7 @@ profiler* resume(const apex_function_address function_address) {
for (unsigned int i = 0 ; i < instance->listeners.size() ; i++) {
instance->listeners[i]->on_resume(tt_ptr);
}
} catch (disabled_profiler_exception e) {
} catch (disabled_profiler_exception &e) {
APEX_UTIL_REF_COUNT_FAILED_RESUME
return profiler::get_disabled_profiler();
}
Expand Down Expand Up @@ -719,7 +719,7 @@ profiler* resume(profiler * p) {
for (unsigned int i = 1 ; i < instance->listeners.size() ; i++) {
instance->listeners[i]->on_resume(p->tt_ptr);
}
} catch (disabled_profiler_exception e) {
} catch (disabled_profiler_exception &e) {
APEX_UTIL_REF_COUNT_FAILED_RESUME
return profiler::get_disabled_profiler();
}
Expand Down Expand Up @@ -1837,7 +1837,7 @@ extern "C" {

} // extern "C"

#ifdef APEX_HAVE_HPX
#ifdef APEX_HAVE_HPX_disabled
HPX_DECLARE_ACTION(APEX_TOP_LEVEL_PACKAGE::finalize, apex_internal_shutdown_action);
HPX_ACTION_HAS_CRITICAL_PRIORITY(apex_internal_shutdown_action);
HPX_PLAIN_ACTION(APEX_TOP_LEVEL_PACKAGE::finalize, apex_internal_shutdown_action);
Expand Down
8 changes: 4 additions & 4 deletions src/apex/apex_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ namespace apex
#define apex_macro(name, member_variable, type, default_value) \
option = getenv(#name); \
if (option == NULL) { \
int length = strlen(default_value) + 1; \
size_t length = strlen(default_value) + 1; \
_##member_variable = (type)(calloc(length, sizeof(char))); \
strncpy(_##member_variable, default_value, length); \
} else { \
int length = strlen(option) + 1; \
size_t length = strlen(option) + 1; \
_##member_variable = (type)(calloc(length, sizeof(char))); \
strncpy(_##member_variable, option, length); \
}
Expand All @@ -68,11 +68,11 @@ namespace apex
type _##member_variable; /* declare the local variable */ \
option = getenv(#name); \
if (option == NULL) { \
int length = strlen(default_value) + 1; \
size_t length = strlen(default_value) + 1; \
_##member_variable = (type)(calloc(length, sizeof(char))); \
strncpy(_##member_variable, default_value, length); \
} else { \
int length = strlen(option) + 1; \
size_t length = strlen(option) + 1; \
_##member_variable = (type)(calloc(length, sizeof(char))); \
strncpy(_##member_variable, option, length); \
}
Expand Down

0 comments on commit 799c885

Please sign in to comment.