PC-Lint warnings fixed:
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 3 Jan 2012 09:57:46 +0000 (07:57 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 3 Jan 2012 09:57:46 +0000 (07:57 -0200)
- Warning 603: Symbol 'address' (line x) not initialized;
- Info 766: Header file 'limits' not used in module 'src\ip\ipv6header.cpp'.

src/ip/ipv6header.cpp

index 78ffaeb..f5ddc82 100644 (file)
@@ -6,8 +6,6 @@
 //          http://www.boost.org/LICENSE_1_0.txt)
 #include "ip/ipv6header.h"
 
-#include <limits>
-
 #include <boost/assert.hpp>
 #include <boost/foreach.hpp>
 #include <boost/scoped_array.hpp>
@@ -126,6 +124,7 @@ address_v6 Ipv6Header::get_source_address() const
     address_v6::bytes_type address; // 16 bytes
     BOOST_ASSERT( 16 == address_v6::bytes_type::size() );
 
+    address.fill( 0 );
     size_t header_byte_index = 8;
     BOOST_FOREACH( unsigned char &byte, address )
     {
@@ -150,6 +149,7 @@ address_v6 Ipv6Header::get_destination_address() const
     address_v6::bytes_type address; // 16 bytes
     BOOST_ASSERT( 16 == address_v6::bytes_type::size() );
 
+    address.fill( 0 );
     size_t header_byte_index = 24;
     BOOST_FOREACH( unsigned char &byte, address )
     {