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

Issue 5755005: render_view_browsertest.cc: Cast wchar_t to int for snprintf. (Closed)

Created:
10 years ago by hans
Modified:
9 years, 5 months ago
Reviewers:
Nico, Hironori Bono
CC:
chromium-reviews, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

render_view_browsertest.cc: Cast wchar_t to int for snprintf. To print the character code, we should cast the wchar_t to an int. The code currently happens to work because we don't compile with -fshort-wchars, and thus wchar_t is four bytes, which coincides with what %d in the snprintf format string expects. However, it's not portable, and Clang complains about this. BUG=none TEST=browser_tests --gtest_filter=RenderViewTest.OnHandleKeyboardEvent Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69145

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M chrome/renderer/render_view_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
hans
10 years ago (2010-12-14 13:49:18 UTC) #1
Nico
LG On Tue, Dec 14, 2010 at 5:49 AM, <hans@chromium.org> wrote: > Reviewers: hbono, Nico, ...
10 years ago (2010-12-14 16:08:37 UTC) #2
Hironori Bono
10 years ago (2010-12-15 01:42:37 UTC) #3
LGTM2.
Thank you for your change.

Regards,

Hironori Bono

Powered by Google App Engine
This is Rietveld 408576698