Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80854 - in trunk/libs/thread: build example test test/sync/mutual_exclusion/timed_mutex
From: vicente.botet_at_[hidden]
Date: 2012-10-04 17:57:19


Author: viboes
Date: 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
New Revision: 80854
URL: http://svn.boost.org/trac/boost/changeset/80854

Log:
Thread: remove some minor warnings
Text files modified:
   trunk/libs/thread/build/Jamfile.v2 | 12 ++++++++++++
   trunk/libs/thread/example/starvephil.cpp | 12 ++++++------
   trunk/libs/thread/test/Jamfile.v2 | 13 +++++++++++++
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp | 2 +-
   trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp | 2 +-
   5 files changed, 33 insertions(+), 8 deletions(-)

Modified: trunk/libs/thread/build/Jamfile.v2
==============================================================================
--- trunk/libs/thread/build/Jamfile.v2 (original)
+++ trunk/libs/thread/build/Jamfile.v2 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
@@ -91,6 +91,18 @@
         <toolset>clang-3.0:<cxxflags>-Wno-delete-non-virtual-dtor
         #<toolset>clang-3.0:<cxxflags>-Wno-unused-function
         #<toolset>clang-3.0:<cxxflags>-Wno-unused-variable
+
+# Note: Some of the remarks from the Intel compiler are disabled
+# remark #193: zero used for undefined preprocessing identifier "XXX"
+# remark #304: access control not specified ("public" by default)
+# remark #593: variable "XXX" was set but never used
+# remark #1418: external function definition with no prior declaration
+# remark #2415: variable "XXX" of static storage duration was declared but never referenced
+
+ <toolset>intel:<cxxflags>-wd193,304,383,444
+ <toolset>intel:<cxxflags>-wd593,981
+ <toolset>intel:<cxxflags>-wd1418
+ <toolset>intel:<cxxflags>-wd2415
 
 
     # : default-build <threading>multi

Modified: trunk/libs/thread/example/starvephil.cpp
==============================================================================
--- trunk/libs/thread/example/starvephil.cpp (original)
+++ trunk/libs/thread/example/starvephil.cpp 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
@@ -29,14 +29,14 @@
         while (m_chickens == 0)
         {
             {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
                 std::cout << "(" << clock() << ") Phil" << id <<
                     ": wot, no chickens? I'll WAIT ..." << std::endl;
             }
             m_condition.wait(lock);
         }
         {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
             std::cout << "(" << clock() << ") Phil" << id <<
                 ": those chickens look good ... one please ..." << std::endl;
         }
@@ -46,7 +46,7 @@
     {
         boost::mutex::scoped_lock lock(m_mutex);
         {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
             std::cout << "(" << clock()
                       << ") Chef: ouch ... make room ... this dish is "
                       << "very hot ..." << std::endl;
@@ -57,7 +57,7 @@
         boost::thread::sleep(xt);
         m_chickens += value;
         {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
             std::cout << "(" << clock() <<
                 ") Chef: more chickens ... " << m_chickens <<
                 " now available ... NOTIFYING ..." << std::endl;
@@ -118,13 +118,13 @@
                 boost::thread::sleep(xt);
             }
             {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
                 std::cout << "(" << clock() << ") Phil" << m_id
                           << ": gotta eat ..." << std::endl;
             }
             g_canteen.get(m_id);
             {
- boost::mutex::scoped_lock lock(iomx);
+ boost::mutex::scoped_lock lk(iomx);
                 std::cout << "(" << clock() << ") Phil" << m_id
                           << ": mmm ... that's good ..." << std::endl;
             }

Modified: trunk/libs/thread/test/Jamfile.v2
==============================================================================
--- trunk/libs/thread/test/Jamfile.v2 (original)
+++ trunk/libs/thread/test/Jamfile.v2 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
@@ -66,6 +66,19 @@
         #<toolset>clang-3.0:<cxxflags>-Wno-unused-function
         #<toolset>clang-3.0:<cxxflags>-Wno-unused-variable
 
+# Note: Some of the remarks from the Intel compiler are disabled
+# remark #193: zero used for undefined preprocessing identifier "XXX"
+# remark #304: access control not specified ("public" by default)
+# remark #593: variable "XXX" was set but never used
+# remark #1418: external function definition with no prior declaration
+# remark #2415: variable "XXX" of static storage duration was declared but never referenced
+
+ <toolset>intel:<cxxflags>-wd193,304,383,444
+ <toolset>intel:<cxxflags>-wd593,981
+ <toolset>intel:<cxxflags>-wd1418
+ <toolset>intel:<cxxflags>-wd2415
+
+
     ;
 
 rule thread-run ( sources )

Modified: trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
@@ -27,5 +27,5 @@
   boost::timed_mutex m1(m0);
 }
 
-#include "impl/thread/test/remove_error_code_unused_warning.hpp"
+#include "../../../remove_error_code_unused_warning.hpp"
 

Modified: trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp
==============================================================================
--- trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp (original)
+++ trunk/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp 2012-10-04 17:57:18 EDT (Thu, 04 Oct 2012)
@@ -27,4 +27,4 @@
   boost::timed_mutex m1(m0);
 }
 
-#include "impl/thread/test/remove_error_code_unused_warning.hpp"
+#include "../../../remove_error_code_unused_warning.hpp"


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk