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

Issue 440013003: Require the result of StringPrintf to be used. (Closed)

Created:
6 years, 4 months ago by Adam Rice
Modified:
6 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Require the result of StringPrintf to be used. When refactoring code it is easy to accidentally disregard the output of base::StringPrintf. The code will still look superficially correct, and may even pass code review (as happened with https://codereview.chromium.org/436133002/ ). This type of bug can be prevented by annotating StringPrintf with WARN_UNUSED_RESULT. Despite the name, this causes a compile error in our build configuration (except on Windows, where it is ignored). This should ensure that such errors are caught by the CQ if not sooner. TEST=build all; base_unittests BUG=400663 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288353

Patch Set 1 #

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

Messages

Total messages: 8 (0 generated)
Adam Rice
PTAL
6 years, 4 months ago (2014-08-06 03:34:23 UTC) #1
darin (slow to review)
On 2014/08/06 03:34:23, Adam Rice wrote: > PTAL Can you please clearly summarize the problem ...
6 years, 4 months ago (2014-08-06 20:33:06 UTC) #2
Adam Rice
On 2014/08/06 20:33:06, darin wrote: > Can you please clearly summarize the problem you are ...
6 years, 4 months ago (2014-08-07 03:53:09 UTC) #3
darin (slow to review)
On 2014/08/07 03:53:09, Adam Rice wrote: > On 2014/08/06 20:33:06, darin wrote: > > Can ...
6 years, 4 months ago (2014-08-07 21:51:15 UTC) #4
darin (slow to review)
LGTM
6 years, 4 months ago (2014-08-07 21:51:43 UTC) #5
Adam Rice
The CQ bit was checked by ricea@chromium.org
6 years, 4 months ago (2014-08-08 13:02:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/440013003/1
6 years, 4 months ago (2014-08-08 13:03:58 UTC) #7
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 14:11:59 UTC) #8
Message was sent while issue was closed.
Change committed as 288353

Powered by Google App Engine
This is Rietveld 408576698