DescriptionFix build by silencing zero-length memset warning.
When the compiler figures out that a particular code path does not add any elements to a zone-allocated growable array, it will generate a warning for the debug-mode zapping code in Zone::Free:
/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 [-Werror]
There are plenty of false positives, e.g., a struct member happens to be unpopulated at a particular use case.
Fix this by only calling memset for non-zero lengths.
TBR=asiva@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42825
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|