aboutsummaryrefslogtreecommitdiffstats
path: root/eval_error.c
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-18 15:46:56 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-18 15:46:56 +0000
commitd088cb2727f8ee68e02b95b4d0a88e422439bd58 (patch)
treee72461a6206a789a23d64f24bac8b553f4152290 /eval_error.c
parent027b576b31cd12bad575b3a39476726273f58c41 (diff)
downloadruby-d088cb2727f8ee68e02b95b4d0a88e422439bd58.tar.gz
eval_error.c: Fix compile error on Solaris 10
* eval_error.c (write_warn, write_warn2, write_warn_str): Fix compile error "operands have incompatible types" with Oracle Solaris Studio 12.4 on Solaris 10. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval_error.c b/eval_error.c
index b0b98e10d4..646e55ffb3 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -6,7 +6,7 @@
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
#define write_warn(str, x) RB_GNUC_EXTENSION_BLOCK( \
NIL_P(str) ? \
- warn_print(x) : ( \
+ warn_print(x) : (void)( \
(__builtin_constant_p(x)) ? \
rb_str_concat((str), rb_str_new((x), (long)strlen(x))) : \
rb_str_concat((str), rb_str_new2(x)) \
@@ -18,14 +18,14 @@
rb_write_error(x) \
)
#else
-#define write_warn(str, x) NIL_P(str) ? rb_write_error((x)) : rb_str_concat((str), rb_str_new2(x))
+#define write_warn(str, x) NIL_P(str) ? rb_write_error((x)) : (void)rb_str_concat((str), rb_str_new2(x))
#define warn_print(x) rb_write_error(x)
#endif
-#define write_warn2(str,x,l) NIL_P(str) ? warn_print2(x,l) : rb_str_concat((str), rb_str_new((x),(l)))
+#define write_warn2(str,x,l) NIL_P(str) ? warn_print2(x,l) : (void)rb_str_concat((str), rb_str_new((x),(l)))
#define warn_print2(x,l) rb_write_error2((x),(l))
-#define write_warn_str(str,x) NIL_P(str) ? rb_write_error_str(x) : rb_str_concat((str), (x))
+#define write_warn_str(str,x) NIL_P(str) ? rb_write_error_str(x) : (void)rb_str_concat((str), (x))
#define warn_print_str(x) rb_write_error_str(x)
static VALUE error_pos_str(void);