From 567d4690cf385aa056d83e78fbe1cff758db325a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 31 Aug 2015 14:05:31 +0100 Subject: [PATCH] Fix ruby warning using clang in director exception code Suppresses warning: error: control may reach end of non-void function [-Werror,-Wreturn-type] The UNUSED macro is not expanded in ruby.h for rb_exc_raise for clang when it ought to be. For patch #512 --- Source/Modules/ruby.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 4b45b87ca..7c87b5192 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -2971,6 +2971,7 @@ public: Printf(rescue->code, "if (%s == 0) ", depthCountName); Printv(rescue->code, Str(tm), "\n", NIL); Printv(rescue->code, "rb_exc_raise(error);\n", NIL); + Printv(rescue->code, "return Qnil;\n", NIL); Printv(rescue->code, "}", NIL); }