Skip to content

Commit eba90bc

Browse files
committed
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. ```
1 parent 2b7025e commit eba90bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dln.c

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ dln_loaderror(const char *format, ...)
104104
#define isdirsep(x) ((x) == '/')
105105
#endif
106106

107+
#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
107108
static size_t
108109
init_funcname_len(const char **file)
109110
{
@@ -134,6 +135,7 @@ static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX
134135
tmp[plen+flen] = '\0';\
135136
*(buf) = tmp;\
136137
} while (0)
138+
#endif
137139

138140
#ifdef USE_DLN_DLOPEN
139141
# include <dlfcn.h>

0 commit comments

Comments
 (0)