[Boost-bugs] [Boost C++ Libraries] #2277: Invalid assignment void* to iovec::iov_base on the Solaris

Subject: [Boost-bugs] [Boost C++ Libraries] #2277: Invalid assignment void* to iovec::iov_base on the Solaris
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-01 18:28:52


#2277: Invalid assignment void* to iovec::iov_base on the Solaris
---------------------------------------------------+------------------------
 Reporter: Simon Atanasyan <atanasyan_at_[hidden]> | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
---------------------------------------------------+------------------------
 On the Solaris following test case cannot be compiled by Sun C++.

 {{{
 % cat test.cc
 #include <boost/asio.hpp>
 int main()
 {
     return 0;
 };
 }}}
 {{{
 % CC -V -c -library=stlport4 -I$BOOST test.cc
 CC: Sun C++ 5.9 SunOS_sparc Patch 124863-06 2008/07/08
 $BOOST/boost/asio/detail/socket_ops.hpp", line 218: Error: Cannot assign
 void* to char*.
 $BOOST/boost/asio/detail/socket_ops.hpp", line 229: Error: Cannot assign
 void* to char*.
 $BOOST/boost/asio/detail/descriptor_ops.hpp", line 66: Error: Cannot
 assign void* to char*.
 $BOOST/boost/asio/detail/descriptor_ops.hpp", line 72: Error: Cannot
 assign void* to char*.
 }}}
 The problem exists in the 1.35, 1.36 and trunk.

 On the Solaris while code compiled by Sun C++ iovec::iov_base field has
 type caddr_t, which is a typedef, usually for char*. So it is impossible
 to assign void* to it without explicit cast.

 Suggested patch is attached.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2277>
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:58 UTC