PC-Lint warnings fixed:
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 21 Dec 2011 10:09:19 +0000 (08:09 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Wed, 21 Dec 2011 10:09:19 +0000 (08:09 -0200)
- Info 1705: static class members may be accessed by the scoping operator;
- Info 732: Loss of sign (arg. no. 1) (int to unsigned int) in 'byte = Payload[ header_byte_index ]';
- Warning 534: Ignoring return value of function 'MessagePayload::read(...)'.

src/ip/ipv6header.cpp

index be6227b..78ffaeb 100644 (file)
@@ -124,9 +124,9 @@ uint8_t Ipv6Header::get_hop_limit() const
 address_v6 Ipv6Header::get_source_address() const
 {
     address_v6::bytes_type address; // 16 bytes
-    BOOST_ASSERT( 16 == address.size() );
+    BOOST_ASSERT( 16 == address_v6::bytes_type::size() );
 
-    int header_byte_index = 8;
+    size_t header_byte_index = 8;
     BOOST_FOREACH( unsigned char &byte, address )
     {
         byte = Payload[ header_byte_index ];
@@ -148,9 +148,9 @@ address_v6 Ipv6Header::get_source_address() const
 address_v6 Ipv6Header::get_destination_address() const
 {
     address_v6::bytes_type address; // 16 bytes
-    BOOST_ASSERT( 16 == address.size() );
+    BOOST_ASSERT( 16 == address_v6::bytes_type::size() );
 
-    int header_byte_index = 24;
+    size_t header_byte_index = 24;
     BOOST_FOREACH( unsigned char &byte, address )
     {
         byte = Payload[ header_byte_index ];
@@ -169,7 +169,7 @@ istream &operator>>(
 {
     // read the first 40 bytes (mandatory for IPv6 header) from the input stream
     // and stores in the buffer object
-    header.Payload.read( is );
+    (void) header.Payload.read( is );
 
     if ( header.get_version() != 6 )
     {