2
0
mirror of https://github.com/boostorg/bpm.git synced 2026-01-19 16:12:14 +00:00

Warning suppression.

This commit is contained in:
Peter Dimov
2015-01-09 19:56:38 +02:00
parent 0846fa85e8
commit 78c69681bd
8 changed files with 17 additions and 13 deletions

View File

@@ -21,7 +21,12 @@ exe bpm : ../src/$(SOURCES) :
<os>NT:<library>ws2_32
<toolset>msvc:<runtime-link>static
<toolset>msvc:<cxxflags>/wd4996 ;
<toolset>msvc:<cxxflags>/wd4996 # deprecated
<toolset>msvc:<cxxflags>/wd4355 # 'this' in base initializer
<toolset>msvc:<cxxflags>/wd4503 # decorated name length exceeded
<toolset>gcc:<cxxflags>-Wshadow ;
install dist-bin : bpm : <location>../../../dist/bin ;
explicit dist-bin ;

View File

@@ -128,9 +128,9 @@ static void add_library( std::string const & path, std::map< std::string, librar
set_field( lib, "key", key );
}
std::string name = get_field( lib, "name" );
std::string fname = get_field( lib, "name" );
if( name.empty() )
if( fname.empty() )
{
msg_printf( -1, "'%s': library '%s' has no name", name.c_str(), key.c_str() );
}

View File

@@ -269,7 +269,6 @@ void cmd_install( char const * argv[] )
}
std::set< std::string > installed;
std::set< std::string > need_build;
std::time_t mtime = 0;

View File

@@ -255,10 +255,10 @@ void cmd_remove( char const * argv[] )
{
std::string list;
for( std::set< std::string >::const_iterator i = deps2.begin(); i != deps2.end(); ++i )
for( std::set< std::string >::const_iterator j = deps2.begin(); j != deps2.end(); ++j )
{
list += " ";
list += *i;
list += *j;
}
msg_printf( -2, "package '%s' cannot be removed due to dependents:\n %s", package.c_str(), list.c_str() );
@@ -285,11 +285,11 @@ void cmd_remove( char const * argv[] )
if( s_opt_d )
{
for( std::set< std::string >::const_iterator i = deps2.begin(); i != deps2.end(); ++i )
for( std::set< std::string >::const_iterator j = deps2.begin(); j != deps2.end(); ++j )
{
if( std::find( packages.begin(), packages.end(), *i ) == packages.end() )
if( std::find( packages.begin(), packages.end(), *j ) == packages.end() )
{
packages.push_back( *i );
packages.push_back( *j );
}
}
}

View File

@@ -9,7 +9,7 @@
#include "error.hpp"
#include <cstring>
error::error( std::string const & name, std::string const & reason ): name_( name ), reason_( reason ), what_( "'" + name_ + "': " + reason )
error::error( std::string const & nm, std::string const & rsn ): name_( nm ), reason_( rsn ), what_( "'" + nm + "': " + rsn )
{
}

View File

@@ -10,7 +10,7 @@
#include "error.hpp"
#include <errno.h>
file_reader::file_reader( std::FILE * f, std::string const & name ): f_( f ), name_( name )
file_reader::file_reader( std::FILE * f, std::string const & nm ): f_( f ), name_( nm )
{
}

View File

@@ -284,7 +284,7 @@ void tar_extract( basic_reader * pr, std::string const & prefix, std::set< std::
throw_errno_error( fn, "write error", r2 );
}
if( r != m )
if( static_cast< unsigned >( r ) != m )
{
fs_close( fd );
throw_errno_error( fn, "write error", ENOSPC );

View File

@@ -147,7 +147,7 @@ void tcp_reader::write( void const * p, std::size_t n )
int r = ::send( sk_, static_cast< char const* >( p ), n, 0 );
if( r < 0 || r < n )
if( r < 0 || static_cast< unsigned >( r ) < n )
{
throw_socket_error( name(), "TCP send error", WSAGetLastError() );
}