Subject: [Boost-bugs] [Boost C++ Libraries] #2414: Fix for "defined but not used" warning
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-10-15 18:59:24
#2414: Fix for "defined but not used" warning
--------------------------+-------------------------------------------------
Reporter: dave | Owner: dgregor
Type: Patches | Status: new
Milestone: Boost 1.37.0 | Component: graph
Version: Boost 1.36.0 | Severity: Cosmetic
Keywords: |
--------------------------+-------------------------------------------------
The following simple patch seems to make GCC a whole lot happier:
{{{
#!diff
--- properties.hpp (revision 3157)
+++ properties.hpp (working copy)
@@ -93,7 +93,7 @@
#else
#define BOOST_DEF_PROPERTY(KIND, NAME) \
struct KIND##_##NAME##_t {}; \
- namespace { KIND##_##NAME##_t KIND##_##NAME; } \
+ namespace { KIND##_##NAME##_t const KIND##_##NAME = {}; } \
BOOST_INSTALL_PROPERTY(KIND, NAME)
#endif
}}}
I haven't tested it against the trunk tests but if you are willing to try
and see what breaks, I would be happy to apply it in trunk if you give me
the go-ahead.
-- Ticket URL: <http://svn.boost.org/trac/boost/ticket/2414> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC