Boost logo

Boost Users :

Subject: Re: [Boost-users] thread warning ununsed variable
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2010-11-26 15:11:52


On 2010-11-25 18:53:23 +0100, Emil Dotchevski said:

> On Thu, Nov 25, 2010 at 5:02 AM, Kraus Philipp
> <philipp.kraus_at_[hidden]> wrote:
>> Hi,
>> On Boost 1.45 I get a warning message in the condition_variable.hpp
>>     inline void condition_variable::wait(unique_lock<mutex>& m)
>>     {
>>         thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
>>         detail::interruption_checker
>> check_for_interruption(&internal_mutex,&cond);
>>         guard.activate(m);
>>         int const res=pthread_cond_wait(&cond,&internal_mutex);
>>         BOOST_ASSERT(!res);
>>         this_thread::interruption_point();
>>     }
>> the res variable isn't used (I compile the code with -O2 option)
>
> I hope you're not requesting removing the assertion :)
>
> Emil Dotchevski
> Reverge Studios, Inc.
> http://www.revergestudios.com/reblog/index.php?n=ReCode

No, it's only a message for the thread developer. I'm ignoring the warning.

Greetings

Phil


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net