Skip to content

Commit

Permalink
core: if debug is enabled and debug messages are disabled, unhide err…
Browse files Browse the repository at this point in the history
…ors too

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Jul 25, 2022
1 parent 69fbc20 commit 64e01e8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion hwloc/topology.c
Expand Up @@ -120,8 +120,18 @@ int hwloc_hide_errors(void)
static int checked = 0;
if (!checked) {
const char *envvar = getenv("HWLOC_HIDE_ERRORS");
if (envvar)
if (envvar) {
hide = atoi(envvar);
#ifdef HWLOC_DEBUG
} else {
/* if debug is enabled and HWLOC_DEBUG_VERBOSE isn't forced to 0,
* show all errors jus like we show all debug messages.
*/
envvar = getenv("HWLOC_DEBUG_VERBOSE");
if (!envvar || atoi(envvar))
hide = 0;
#endif
}
checked = 1;
}
return hide;
Expand Down

0 comments on commit 64e01e8

Please sign in to comment.