Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Issue 152843003: Use snprintf over sprintf for a few places (Closed)

Created:
6 years, 10 months ago by boliu
Modified:
6 years, 10 months ago
Reviewers:
no sievers
CC:
chromium-reviews, piman+watch_chromium.org
Visibility:
Public.

Description

Use sstream over sprintf gcc warns about sprintf being unsafe in some cases. Also snprintf is not available under windows. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249365

Patch Set 1 #

Patch Set 2 : use sstream #

Total comments: 7

Patch Set 3 : less verbose #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -9 lines) Patch
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.cc View 1 2 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
boliu
6 years, 10 months ago (2014-02-04 03:36:07 UTC) #1
boliu
Huh, won't compile on windows :/ http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
6 years, 10 months ago (2014-02-04 04:23:32 UTC) #2
no sievers
On 2014/02/04 04:23:32, boliu wrote: > Huh, won't compile on windows :/ > > http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 ...
6 years, 10 months ago (2014-02-06 00:04:25 UTC) #3
boliu
Good idea... https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc#newcode15 gpu/command_buffer/client/gles2_implementation.cc:15: #include <string> presubmit was warning <string.h> is ...
6 years, 10 months ago (2014-02-06 01:08:00 UTC) #4
no sievers
lgtm https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc#newcode125 gpu/command_buffer/client/gles2_implementation.cc:125: this_in_hex_ = ss.str(); On 2014/02/06 01:08:00, boliu wrote: ...
6 years, 10 months ago (2014-02-06 01:33:37 UTC) #5
boliu
https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc File gpu/command_buffer/client/gles2_implementation.cc (right): https://codereview.chromium.org/152843003/diff/90001/gpu/command_buffer/client/gles2_implementation.cc#newcode125 gpu/command_buffer/client/gles2_implementation.cc:125: this_in_hex_ = ss.str(); On 2014/02/06 01:33:37, sievers wrote: > ...
6 years, 10 months ago (2014-02-06 01:54:45 UTC) #6
boliu
The CQ bit was checked by [email protected]
6 years, 10 months ago (2014-02-06 04:21:17 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/152843003/10003
6 years, 10 months ago (2014-02-06 04:23:26 UTC) #8
commit-bot: I haz the power
6 years, 10 months ago (2014-02-06 11:38:52 UTC) #9
Message was sent while issue was closed.
Change committed as 249365

Powered by Google App Engine
This is Rietveld 408576698