Ticket #3598: patch.diff

File patch.diff, 6.4 KB (added by John Maddock, 13 years ago)
  • test_tools_test.cpp

     
    503503//____________________________________________________________________________//
    504504
    505505struct A {
    506     friend std::ostream& operator<<( std::ostream& str, A const& a ) { str << "struct A"; return str;}
     506    friend std::ostream& operator<<( std::ostream& str, A const& ) { str << "struct A"; return str;}
    507507};
    508508
    509509TEST_CASE( test_BOOST_TEST_MESSAGE )
  • boost_check_equal_str.cpp

     
    1919{
    2020    char const* buf_ptr_cch     = "abc";
    2121    char const  buf_array_cch[] = "abc";
    22     char*       buf_ptr_ch      = "abc";
    2322    char        buf_array_ch[]  = "abc";
     23    char*       buf_ptr_ch      = buf_array_ch;
    2424    std::string buf_str         = "abc";
    2525
    2626    BOOST_CHECK_EQUAL(buf_ptr_cch, buf_ptr_cch);
  • foreach_test.cpp

     
    2020
    2121#include <boost/test/utils/foreach.hpp>
    2222
     23#ifdef BOOST_MSVC
     24#pragma warning(disable:4702) // Unreachable code
     25#endif
     26
    2327template<class T>
    2428void baz( std::list<T>const& list_of_T )
    2529{
  • result_report_test.cpp

     
    5858
    5959void very_bad_foo()  {
    6060    log_guard lg;
     61    (void)lg; // Warning suppression, it is used and needed really!
    6162    onullstream_type null_out;
    6263    unit_test_log.set_stream( null_out );
    6364    BOOST_FAIL( "" );
    … …  
    105106BOOST_AUTO_TEST_CASE( test_result_reports )
    106107{
    107108    guard G;
     109    (void)G; // Waring suppression, it is used and needed really!
    108110
    109111#define PATTERN_FILE_NAME "result_report_test.pattern"
    110112
  • ../../../boost/test/unit_test_log_formatter.hpp

     
    103103        // for backward compatibility
    104104        log_exception( os, cd, ex.what() );
    105105    }
    106     virtual void        log_exception( std::ostream&, log_checkpoint_data const&, const_string explanation ) {}
     106    virtual void        log_exception( std::ostream&, log_checkpoint_data const&, const_string /*explanation*/ ) {}
    107107
    108108    virtual void        log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ) = 0;
    109109    virtual void        log_entry_value( std::ostream&, const_string value ) = 0;
  • ../../../boost/test/impl/execution_monitor.ipp

     
    788788        ::alarm( 0 );
    789789
    790790#ifdef BOOST_TEST_USE_ALT_STACK
    791     stack_t sigstk = {};
     791#ifdef __GNUC__
     792    // We shouldn't need to explicitly initialize all the members here,
     793    // but gcc warns if we don't, so add initializers for each of the
     794    // members specified in the POSIX std:
     795    stack_t sigstk = { 0, 0, 0, };
     796#else
     797    stack_t sigstk = { };
     798#endif
    792799
    793800    sigstk.ss_size  = MINSIGSTKSZ;
    794801    sigstk.ss_flags = SS_DISABLE;
    … …  
    11271134execution_monitor::catch_signals( unit_test::callback0<int> const& F )
    11281135{
    11291136    _invalid_parameter_handler old_iph = _invalid_parameter_handler();
    1130     BOOST_TEST_CRT_HOOK_TYPE old_crt_hook;
     1137    BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
    11311138
    11321139    if( !p_catch_system_errors )
    11331140        _set_se_translator( &detail::seh_catch_preventer );
  • ../../../boost/test/utils/runtime/env/environment.ipp

     
    7575
    7676//____________________________________________________________________________//
    7777
     78#ifdef BOOST_MSVC
     79// Suppress warning:
     80// warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
     81#pragma warning(push)
     82#pragma warning(disable:4996)
     83#endif
     84
    7885BOOST_RT_PARAM_INLINE cstring
    7986sys_read_var( cstring var_name )
    8087{
    … …  
    8289    return BOOST_RT_PARAM_GETENV( var_name.begin() );
    8390}
    8491
     92#ifdef BOOST_MSVC
     93#pragma warning(pop)
     94#endif
     95
    8596//____________________________________________________________________________//
    8697
    8798BOOST_RT_PARAM_INLINE void
  • ../../../boost/test/utils/runtime/config.hpp

     
    6767typedef std::basic_ostream<char_type>                           out_stream;
    6868#endif
    6969
     70#ifdef BOOST_MSVC
     71// suppress warning
     72// warning C4996: 'putenv': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _putenv. See online help for details.
     73#pragma warning(push)
     74#pragma warning(disable:4996)
     75#endif
     76
    7077#ifndef UNDER_CE
    7178#if defined(__COMO__) && 0
    7279inline void
    … …  
    9299#endif
    93100#endif
    94101
     102#ifdef BOOST_MSVC
     103#pragma warning(pop)
     104#endif
     105
    95106#define BOOST_RT_PARAM_LITERAL( l ) l
    96107#define BOOST_RT_PARAM_CSTRING_LITERAL( l ) cstring( l, sizeof( l ) - 1 )
    97108#define BOOST_RT_PARAM_GETENV getenv
  • ../../../boost/test/utils/basic_cstring/basic_cstring.hpp

     
    548548        --it;
    549549    }
    550550
    551     return it == last ? npos : it - begin();
     551    return it == last ? static_cast<size_type>(npos) : static_cast<size_type>(it - begin());
    552552}
    553553
    554554//____________________________________________________________________________//