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. ```
This commit is contained in:
parent
2b7025e680
commit
eba90bc034
2
dln.c
2
dln.c
@ -104,6 +104,7 @@ dln_loaderror(const char *format, ...)
|
|||||||
#define isdirsep(x) ((x) == '/')
|
#define isdirsep(x) ((x) == '/')
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
|
||||||
static size_t
|
static size_t
|
||||||
init_funcname_len(const char **file)
|
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';\
|
tmp[plen+flen] = '\0';\
|
||||||
*(buf) = tmp;\
|
*(buf) = tmp;\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DLN_DLOPEN
|
#ifdef USE_DLN_DLOPEN
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user