Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Issue 849873002: Fix build by silencing zero-length memset warning. (Closed)

Created:
5 years, 11 months ago by koda
Modified:
5 years, 11 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M runtime/vm/zone.h View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
koda
5 years, 11 months ago (2015-01-13 16:57:38 UTC) #1
koda
Committed patchset #1 (id:1) manually as r42825 (presubmit successful).
5 years, 11 months ago (2015-01-13 17:34:13 UTC) #2
siva
5 years, 11 months ago (2015-01-13 18:06:45 UTC) #3
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698