Subject: [Boost-bugs] [Boost C++ Libraries] #1283: unsigned filesystem::system_error_type passed a negative value on windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-09-25 09:24:02
#1283: unsigned filesystem::system_error_type passed a negative value on windows
--------------------------------+-------------------------------------------
Reporter: lazalong_at_[hidden] | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.34.1 | Severity: Problem
Keywords: |
--------------------------------+-------------------------------------------
On windows in path.hpp system_error_type is defined as an unsigned:
{{{
# ifdef BOOST_WINDOWS_API
typedef unsigned system_error_type;
BOOST_FILESYSTEM_DECL
errno_type lookup_errno( system_error_type sys_err_code );
# else
typedef int system_error_type;
inline errno_type lookup_errno( system_error_type sys_err_code )
{ return sys_err_code; }
# endif
}}}
This will cause warnings with mingw because in conveniance.hpp a negative
value is assigned to it in the method '''create_directories''' on line 44-
47:
{{{
if ( !ph.empty() && !is_directory(ph) )
boost::throw_exception( basic_filesystem_error<Path>(
"boost::filesystem::create_directories", ph, -1 ) );
}}}
Here is the warning message:
{{{
../../include/boost/filesystem/convenience.hpp: In function `bool
boost::filesystem::create_directories(const Path&)':
../../include/boost/filesystem/convenience.hpp:46: warning: passing
negative value `-0x000000001' for converting 3 of
`boost::filesystem::basic_filesystem_error<Path>::basic_filesystem_error(const
std::string&, const Path&, boost::filesystem::system_error_type) [with
Path = boost::filesystem::path]'
}}}
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1283>
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:56 UTC