From 57a180877421bfa6eb850efc6508ce560932fc23 Mon Sep 17 00:00:00 2001 From: ngoto Date: Fri, 4 Dec 2015 15:59:10 +0000 Subject: * include/ruby/ruby.h (RB_OBJ_TAINT): follow-up of r52881. Turn into void expression not to use unexpected result. Fix "operands have incompatible types" error with Oracle Solaris Studio 12.x on Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ include/ruby/ruby.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 14cb84b104..991997e454 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Dec 5 00:56:29 2015 Naohisa Goto + + * include/ruby/ruby.h (RB_OBJ_TAINT): follow-up of r52881. + Turn into void expression not to use unexpected result. + Fix "operands have incompatible types" error with + Oracle Solaris Studio 12.x on Solaris. + Fri Dec 4 19:52:52 2015 Martin Duerst * enc/iso_8859_13.c: Added three missing lower/upper-case diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 09705243e8..d54c51121c 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1304,7 +1304,7 @@ struct RStruct { #define RB_OBJ_TAINTED_RAW(x) RB_FL_TEST_RAW(x, RUBY_FL_TAINT) #define RB_OBJ_TAINTED(x) (!!RB_FL_TEST((x), RUBY_FL_TAINT)) #define RB_OBJ_TAINT_RAW(x) RB_FL_SET_RAW(x, RUBY_FL_TAINT) -#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : 0) +#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : (void)0) #define RB_OBJ_UNTRUSTED(x) RB_OBJ_TAINTED(x) #define RB_OBJ_UNTRUST(x) RB_OBJ_TAINT(x) #define RB_OBJ_INFECT_RAW(x,s) RB_FL_SET_RAW(x, RB_OBJ_TAINTED_RAW(s)) -- cgit v1.2.3