Bug 1165 - memset used with constant zero length parameter
memset used with constant zero length parameter
Product: ns-3
Classification: Unclassified
Component: network
All All
: P5 trivial
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2011-05-18 19:30 EDT by John Abraham
Modified: 2011-08-09 16:27 EDT (History)
1 user (show)

See Also:

patch (535 bytes, patch)
2011-05-18 19:33 EDT, John Abraham
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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
Comment 4 John Abraham 2011-08-09 16:27:38 EDT
already fixed in ns-3.11