ruby-changes:58381
From: Yusuke <ko1@a...>
Date: Thu, 24 Oct 2019 08:31:31 +0900 (JST)
Subject: [ruby-changes:58381] 281f754126 (master): include/ruby/backward/cxxanyargs.hpp: call `va_end` before return
https://git.ruby-lang.org/ruby.git/commit/?id=281f754126 From 281f754126a9edf003e347f28ab20e154e22464d Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Thu, 24 Oct 2019 08:30:33 +0900 Subject: include/ruby/backward/cxxanyargs.hpp: call `va_end` before return Coverity Scan complains it. diff --git a/include/ruby/backward/cxxanyargs.hpp b/include/ruby/backward/cxxanyargs.hpp index 55b841b..a2e63f2 100644 --- a/include/ruby/backward/cxxanyargs.hpp +++ b/include/ruby/backward/cxxanyargs.hpp @@ -227,8 +227,9 @@ rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L227 func2_t *y = reinterpret_cast<func2_t*>(e); va_list ap; va_start(ap, r); - return ::rb_vrescue2(t, w, y, r, ap); + VALUE ret = ::rb_vrescue2(t, w, y, r, ap); va_end(ap); + return ret; } RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprected") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/