summaryrefslogtreecommitdiffhomepage
path: root/src/state.c
diff options
context:
space:
mode:
authordearblue <[email protected]>2020-11-08 10:52:04 +0900
committerdearblue <[email protected]>2020-11-08 10:52:04 +0900
commit06d231d37287a97c28c6d2fb457475e9e60d7138 (patch)
tree6539ec7a7ee10ef01ae07a7df4f5d53fbf83ee68 /src/state.c
parent8455344bf3fd92ca00f598accfe6b3eb29ddcb0c (diff)
downloadmruby-06d231d37287a97c28c6d2fb457475e9e60d7138.tar.gz
mruby-06d231d37287a97c28c6d2fb457475e9e60d7138.zip
Suppress `-Wunused-function`
If no gem was specified, it was warning because `init_mrbgems()` was not used. ref: #4250
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c
index 1f85448a1..aef9605bc 100644
--- a/src/state.c
+++ b/src/state.c
@@ -77,11 +77,13 @@ mrb_open(void)
return mrb;
}
+#ifndef DISABLE_GEMS
static void
init_mrbgems(mrb_state *mrb, void *opaque)
{
mrb_init_mrbgems(mrb);
}
+#endif
MRB_API mrb_state*
mrb_open_allocf(mrb_allocf f, void *ud)