summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-01-07 18:15:45 +0100
committercremno <[email protected]>2014-01-07 18:15:45 +0100
commit84e9c4befe071d95ff36baf2faf76a7a6d52bc1e (patch)
treedb6436fe69e35776aaea5b3082b127adf0b4d2c4
parentcff4ac6bb7fac7cf72b58a0081d7dacd9c1f492c (diff)
downloadmruby-84e9c4befe071d95ff36baf2faf76a7a6d52bc1e.tar.gz
mruby-84e9c4befe071d95ff36baf2faf76a7a6d52bc1e.zip
string.c: remove str_mod_check
Clang 3.4 emits '-Wunused-function' - and it's really unused! But according to the description this seems to be a bug: >Warn whenever a static function is declared but not defined or >a non-inline static function is unused. This warning is enabled by -Wall. Source: <http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>
-rw-r--r--src/string.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/string.c b/src/string.c
index e8c37180d..7d0cdaf0d 100644
--- a/src/string.c
+++ b/src/string.c
@@ -107,16 +107,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len)
return str;
}
-static inline void
-str_mod_check(mrb_state *mrb, mrb_value str, char *p, mrb_int len)
-{
- struct RString *s = mrb_str_ptr(str);
-
- if (s->ptr != p || s->len != len) {
- mrb_raise(mrb, E_RUNTIME_ERROR, "string modified");
- }
-}
-
#define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
/* char offset to byte offset */