Boost C++ Libraries: Ticket #1283: unsigned filesystem::system_error_type passed a negative value on windows https://svn.boost.org/trac10/ticket/1283 <p> On windows in path.hpp system_error_type is defined as an unsigned: </p> <pre class="wiki"># 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 </pre><p> This will cause warnings with mingw because in conveniance.hpp a negative value is assigned to it in the method <strong>create_directories</strong> on line 44-47: </p> <pre class="wiki"> if ( !ph.empty() &amp;&amp; !is_directory(ph) ) boost::throw_exception( basic_filesystem_error&lt;Path&gt;( "boost::filesystem::create_directories", ph, -1 ) ); </pre><p> Here is the warning message: </p> <pre class="wiki"> ../../include/boost/filesystem/convenience.hpp: In function `bool boost::filesystem::create_directories(const Path&amp;)': ../../include/boost/filesystem/convenience.hpp:46: warning: passing negative value `-0x000000001' for converting 3 of `boost::filesystem::basic_filesystem_error&lt;Path&gt;::basic_filesystem_error(const std::string&amp;, const Path&amp;, boost::filesystem::system_error_type) [with Path = boost::filesystem::path]' </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1283 Trac 1.4.3 Beman Dawes Tue, 25 Sep 2007 13:52:48 GMT status, severity, milestone changed; resolution set https://svn.boost.org/trac10/ticket/1283#comment:1 https://svn.boost.org/trac10/ticket/1283#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Cosmetic</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> <p> That particular warning has disappeared in the SVN trunk HEAD due to a prior code change. I did, however, increase the warning level on my development platform and then clear the half-dozen or so other warning messages that turned up. </p> <p> Thanks, </p> <p> --Beman </p> Ticket