diff options
author | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-26 18:37:21 +0900 |
---|---|---|
committer | Urabe, Shyouhei <shyouhei@ruby-lang.org> | 2019-04-29 21:52:44 +0900 |
commit | 34e1079aef81d108890fb167d7df69960e994ff5 (patch) | |
tree | 8b9b28a53bc0072835b7f2a9350ef089ffea619b /mjit.c | |
parent | e7b18ca6d9b45b7e71694557b9fab8152c62c1ed (diff) | |
download | bundler-34e1079aef81d108890fb167d7df69960e994ff5.tar.gz |
glibc says memcpy cannot take NULL
At least since 2004, glibc's <string.h> annotates memcpy as
__attribute__((__nonnull__)). This basedir is passed to it. When
LOAD_RELATIVE is not defined and MJIT_SEARCH_BUILD_DIR is not set,
this variable is never updated. Should initialize with meaningful
default value.
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -469,7 +469,7 @@ init_header_filename(void) // Root path of the running ruby process. Equal to RbConfig::TOPDIR. VALUE basedir_val; #endif - const char *basedir = NULL; + const char *basedir = ""; size_t baselen = 0; char *p; #ifdef _WIN32 |