Bug 1165

Summary: memset used with constant zero length parameter
Product: ns-3 Reporter: John Abraham <john.abraham.in>
Component: networkAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: trivial CC: tomh
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: patch

Description John Abraham 2011-05-18 19:30:34 EDT
[ 672/1458] cxx: src/network/utils/ipv6-address.cc -> build/optimized/src/network/utils/ipv6-address_1.o
cc1plus: warnings being treated as errors
In file included from /usr/include/string.h:642:0,
                 from ../src/network/utils/ipv6-address.h:25,
                 from ../src/network/utils/mac48-address.h:28,
                 from ../src/network/utils/ipv6-address.cc:26:
In function ‘void* memset(void*, int, size_t)’,
    inlined from ‘ns3::Ipv6Prefix::Ipv6Prefix(uint8_t)’ at ../src/network/utils/ipv6-address.cc:600:34,
    inlined from ‘static ns3::Ipv6Prefix ns3::Ipv6Prefix::GetZero()’ at ../src/network/utils/ipv6-address.cc:686:39:
/usr/include/bits/string3.h:82:32: error: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters
Comment 1 John Abraham 2011-05-18 19:33:50 EDT
Created attachment 1143 [details]
patch
Comment 2 John Abraham 2011-05-18 20:01:33 EDT
seen on g++4.5.x
Comment 3 Tom Henderson 2011-08-09 16:25:03 EDT
+1
Comment 4 John Abraham 2011-08-09 16:27:38 EDT
already fixed in ns-3.11