Changeset 54393


Ignore:
Timestamp:
Jun 27, 2009, 7:07:40 AM (9 years ago)
Author:
chris_kohlhoff
Message:

Fix various g++ warnings. Ref #1341.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/asio/ssl/detail/openssl_init.hpp

    r47218 r54393  
    2020
    2121#include <boost/asio/detail/push_options.hpp>
     22#include <cstring>
    2223#include <vector>
    2324#include <boost/assert.hpp>
     
    101102
    102103    static void openssl_locking_func(int mode, int n,
    103       const char *file, int line)
     104      const char* /*file*/, int /*line*/)
    104105    {
    105106      if (mode & CRYPTO_LOCK)
     
    123124    : ref_(do_init::instance())
    124125  {
    125     while (&instance_ == 0); // Ensure openssl_init::instance_ is linked in.
     126    using namespace std; // For memmove.
     127
     128    // Ensure openssl_init::instance_ is linked in.
     129    openssl_init* tmp = &instance_;
     130    memmove(&tmp, &tmp, sizeof(openssl_init*));
    126131  }
    127132
  • trunk/boost/asio/ssl/detail/openssl_stream_service.hpp

    r52293 r54393  
    185185  // Create a new stream implementation.
    186186  template <typename Stream, typename Context_Service>
    187   void create(impl_type& impl, Stream& next_layer,
     187  void create(impl_type& impl, Stream& /*next_layer*/,
    188188      basic_context<Context_Service>& context)
    189189  {
     
    200200  // Destroy a stream implementation.
    201201  template <typename Stream>
    202   void destroy(impl_type& impl, Stream& next_layer)
     202  void destroy(impl_type& impl, Stream& /*next_layer*/)
    203203  {
    204204    if (impl != 0)
     
    476476  // Peek at the incoming data on the stream.
    477477  template <typename Stream, typename Mutable_Buffers>
    478   std::size_t peek(impl_type& impl, Stream& next_layer,
    479       const Mutable_Buffers& buffers, boost::system::error_code& ec)
     478  std::size_t peek(impl_type& /*impl*/, Stream& /*next_layer*/,
     479      const Mutable_Buffers& /*buffers*/, boost::system::error_code& ec)
    480480  {
    481481    ec = boost::system::error_code();
     
    485485  // Determine the amount of data that may be read without blocking.
    486486  template <typename Stream>
    487   std::size_t in_avail(impl_type& impl, Stream& next_layer,
     487  std::size_t in_avail(impl_type& /*impl*/, Stream& /*next_layer*/,
    488488      boost::system::error_code& ec)
    489489  {
  • trunk/libs/asio/example/echo/async_udp_echo_server.cpp

    r43472 r54393  
    5151  }
    5252
    53   void handle_send_to(const boost::system::error_code& error, size_t bytes_sent)
     53  void handle_send_to(const boost::system::error_code& /*error*/,
     54      size_t /*bytes_sent*/)
    5455  {
    5556    socket_.async_receive_from(
  • trunk/libs/asio/example/http/server/request_handler.cpp

    r43472 r54393  
    9090      if (i + 3 <= in.size())
    9191      {
    92         int value;
     92        int value = 0;
    9393        std::istringstream is(in.substr(i + 1, 2));
    9494        if (is >> std::hex >> value)
  • trunk/libs/asio/example/http/server/request_parser.cpp

    r43472 r54393  
    301301bool request_parser::is_ctl(int c)
    302302{
    303   return c >= 0 && c <= 31 || c == 127;
     303  return (c >= 0 && c <= 31) || (c == 127);
    304304}
    305305
  • trunk/libs/asio/example/http/server2/request_handler.cpp

    r43472 r54393  
    9090      if (i + 3 <= in.size())
    9191      {
    92         int value;
     92        int value = 0;
    9393        std::istringstream is(in.substr(i + 1, 2));
    9494        if (is >> std::hex >> value)
  • trunk/libs/asio/example/http/server2/request_parser.cpp

    r43472 r54393  
    301301bool request_parser::is_ctl(int c)
    302302{
    303   return c >= 0 && c <= 31 || c == 127;
     303  return (c >= 0 && c <= 31) || (c == 127);
    304304}
    305305
  • trunk/libs/asio/example/http/server3/request_handler.cpp

    r43472 r54393  
    9090      if (i + 3 <= in.size())
    9191      {
    92         int value;
     92        int value = 0;
    9393        std::istringstream is(in.substr(i + 1, 2));
    9494        if (is >> std::hex >> value)
  • trunk/libs/asio/example/http/server3/request_parser.cpp

    r43472 r54393  
    301301bool request_parser::is_ctl(int c)
    302302{
    303   return c >= 0 && c <= 31 || c == 127;
     303  return (c >= 0 && c <= 31) || (c == 127);
    304304}
    305305
  • trunk/libs/asio/example/local/connect_pair.cpp

    r47261 r54393  
    9696}
    9797
    98 int main(int argc, char* argv[])
     98int main()
    9999{
    100100  try
  • trunk/libs/asio/example/porthopper/server.cpp

    r46766 r54393  
    8383
    8484  void handle_control_request_timer(tcp_socket_ptr socket,
    85       control_request_ptr request, timer_ptr delay_timer)
     85      control_request_ptr request, timer_ptr /*delay_timer*/)
    8686  {
    8787    // Determine what address this client is connected from, since
  • trunk/libs/asio/example/services/logger_service.hpp

    r43472 r54393  
    9090  /// actually needed. It is retained here to illustrate how service functions
    9191  /// are typically defined.
    92   void use_file(impl_type& impl, const std::string& file)
     92  void use_file(impl_type& /*impl*/, const std::string& file)
    9393  {
    9494    // Pass the work of opening the file to the background thread.
  • trunk/libs/asio/example/timeouts/datagram_receive_timeout.cpp

    r43472 r54393  
    3535  }
    3636
    37   void handle_receive_from(const boost::system::error_code& err, size_t length)
     37  void handle_receive_from(const boost::system::error_code& err,
     38      size_t /*length*/)
    3839  {
    3940    if (err)
  • trunk/libs/asio/test/read.cpp

    r48418 r54393  
    164164
    165165bool old_style_transfer_all(const boost::system::error_code& ec,
    166     size_t bytes_transferred)
     166    size_t /*bytes_transferred*/)
    167167{
    168168  return !!ec;
     
    170170
    171171size_t short_transfer(const boost::system::error_code& ec,
    172     size_t bytes_transferred)
     172    size_t /*bytes_transferred*/)
    173173{
    174174  return !!ec ? 0 : 3;
  • trunk/libs/asio/test/read_at.cpp

    r48418 r54393  
    189189
    190190bool old_style_transfer_all(const boost::system::error_code& ec,
    191     size_t bytes_transferred)
     191    size_t /*bytes_transferred*/)
    192192{
    193193  return !!ec;
     
    195195
    196196size_t short_transfer(const boost::system::error_code& ec,
    197     size_t bytes_transferred)
     197    size_t /*bytes_transferred*/)
    198198{
    199199  return !!ec ? 0 : 3;
  • trunk/libs/asio/test/write.cpp

    r48418 r54393  
    161161
    162162bool old_style_transfer_all(const boost::system::error_code& ec,
    163     size_t bytes_transferred)
     163    size_t /*bytes_transferred*/)
    164164{
    165165  return !!ec;
     
    167167
    168168size_t short_transfer(const boost::system::error_code& ec,
    169     size_t bytes_transferred)
     169    size_t /*bytes_transferred*/)
    170170{
    171171  return !!ec ? 0 : 3;
  • trunk/libs/asio/test/write_at.cpp

    r48418 r54393  
    175175
    176176bool old_style_transfer_all(const boost::system::error_code& ec,
    177     size_t bytes_transferred)
     177    size_t /*bytes_transferred*/)
    178178{
    179179  return !!ec;
     
    181181
    182182size_t short_transfer(const boost::system::error_code& ec,
    183     size_t bytes_transferred)
     183    size_t /*bytes_transferred*/)
    184184{
    185185  return !!ec ? 0 : 3;
Note: See TracChangeset for help on using the changeset viewer.