Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

erts: Fix '#ifdef' for unused static functions

On architectures where cpu topology was unavailable,
warnings erupted due to unused static functions.

Those warnings are now silenced.
  • Loading branch information...
commit e5a1aa05455574f6220887fea7ba61b833062fe9 1 parent 6247518
@psyeugenic psyeugenic authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 erts/lib_src/common/erl_misc_utils.c
View
8 erts/lib_src/common/erl_misc_utils.c
@@ -122,6 +122,12 @@
#include <sys/sysctl.h>
#endif
+/* Simplify include for static functions */
+
+#if defined(__linux__) || defined(HAVE_KSTAT) || defined(__WIN32__) || defined(__FreeBSD__)
+# define ERTS_CPU_TOPOLOGY_ENABLED (1)
+#endif
+
static int read_topology(erts_cpu_info_t *cpuinfo);
#if defined(ERTS_HAVE_MISC_UTIL_AFFINITY_MASK__)
@@ -667,6 +673,7 @@ erts_unbind_from_cpu_str(char *str)
}
+#if defined(ERTS_CPU_TOPOLOGY_ENABLED)
static int
pn_cmp(const void *vx, const void *vy)
{
@@ -757,6 +764,7 @@ adjust_processor_nodes(erts_cpu_info_t *cpuinfo, int no_nodes)
}
}
}
+#endif
#ifdef __linux__
Please sign in to comment.
Something went wrong with that request. Please try again.