octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation warning, easy fix?


From: John W. Eaton
Subject: Re: Compilation warning, easy fix?
Date: Fri, 08 Mar 2013 16:58:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 03/08/2013 04:34 PM, Rik wrote:
3/8/13

John,

When compiling I get this warning,

interp-core/mex.cc:2953: warning: ‘void unwind_protect::add(void
(*)(void*), void*)’ is deprecated (declared at interp-core/unwind-prot.h:51)

Would it be easy to replace line 2953 with the correct, undeprecated call?

The line in question is

   frame.add (mex::cleanup, static_cast<void *>  (&context));

and the prototype for the deprecated function is

   void add (void (*fcn) (void *), void *ptr = 0) GCC_ATTR_DEPRECATED
   {
     add (new fcn_arg_elem<void *>  (fcn, ptr));
   }

It would appear to be as simple as substituting the body of the deprecated
function into mex.cc, but I haven't looked into the unwind_protect class.

I fixed it by calling add_fcn instead of add.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]