From eba90bc03482523f5243b3657aff4299631d94dd Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 20 Jan 2022 10:03:59 +0900 Subject: Fix warnings ``` compiling ..../ruby/ruby/dln.c ..../ruby/ruby/dln.c:108:1: warning: unused function 'init_funcname_len' [-Wunused-function] init_funcname_len(const char **file) ^ ..../ruby/ruby/dln.c:122:19: warning: unused variable 'funcname_prefix' [-Wunused-const-variable] static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX; ^ 2 warnings generated. ``` --- dln.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dln.c') diff --git a/dln.c b/dln.c index 9e9632ef0c..48bebb824b 100644 --- a/dln.c +++ b/dln.c @@ -104,6 +104,7 @@ dln_loaderror(const char *format, ...) #define isdirsep(x) ((x) == '/') #endif +#if defined(_WIN32) || defined(USE_DLN_DLOPEN) static size_t init_funcname_len(const char **file) { @@ -134,6 +135,7 @@ static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX tmp[plen+flen] = '\0';\ *(buf) = tmp;\ } while (0) +#endif #ifdef USE_DLN_DLOPEN # include -- cgit v1.2.3