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

Issue 7003140: Fix two bugs found by a new clang warning I'm currently testing: (Closed)

Created:
9 years, 6 months ago by Nico
Modified:
9 years, 6 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, brettw-cc_chromium.org, acolwell GONE FROM CHROMIUM, annacc, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Fix two bugs found by a new clang warning I'm currently testing: /Users/thakis/src/chrome-git/src/base/md5.cc:250:24: error: The sizeof expression in 'memset' has type 'struct Context *', the same type that the first argument has. The sizeof expression should probably have type 'struct Context' instead. [-Werror] memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ^ 1 error generated. /Users/thakis/src/chrome-git/src/media/video/capture/fake_video_capture_device.cc:75:32: error: The sizeof expression in 'memset' has type 'unsigned char *', the same type that the first argument has. The sizeof expression should probably have type 'unsigned char' instead. [-Werror] memset(fake_frame_.get(), 0, sizeof(fake_frame_.get())); ^ 1 error generated. The warning is up for review here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110613/042719.html BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88855

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M base/md5.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/video/capture/fake_video_capture_device.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nico
9 years, 6 months ago (2011-06-13 06:43:57 UTC) #1
Evan Martin
LGTM Cool warning! I wonder though what people who want to be warning clean can ...
9 years, 6 months ago (2011-06-13 17:15:00 UTC) #2
Nico
On Mon, Jun 13, 2011 at 10:14 AM, Evan Martin <evan@chromium.org> wrote: > LGTM > ...
9 years, 6 months ago (2011-06-13 17:19:29 UTC) #3
Ami GONE FROM WEBRTC_CHROMIUM
> > Can you think of a case where it might misfire? > If the ...
9 years, 6 months ago (2011-06-13 17:36:42 UTC) #4
Nico
On 2011/06/13 17:36:42, fischman1 wrote: > > > > Can you think of a case ...
9 years, 6 months ago (2011-06-13 17:57:41 UTC) #5
Ami GONE FROM WEBRTC_CHROMIUM
9 years, 6 months ago (2011-06-13 18:08:30 UTC) #6
>
> I'm only warning if ar has pointer type (which arrays don't), so this case
> isn't
> warned on.
>

SGTM

Powered by Google App Engine
This is Rietveld 408576698