New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 684114 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Package chromeos-base/mttools fails to build with llvm-next

Project Member Reported by manojgupta@chromium.org, Jan 23 2017

Issue description

llvm-next complains about non-literal format string to vfprintf.

src/replay_device.cc:96:30: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vfprintf(stream.GetFP(), format, args);


 
For the time being, I am disabling the warning:
https://chromium-review.googlesource.com/#/c/431303/
Cc: asimjour@chromium.org denniskempin@chromium.org charliemooney@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mttools/+/8da2c778eafaa0eb961308fcb5426dde45b08c5f

commit 8da2c778eafaa0eb961308fcb5426dde45b08c5f
Author: Manoj Gupta <manojgupta@google.com>
Date: Mon Jan 23 23:07:28 2017

Fix mttools to build with llvm-next.

Ignore following clang warning:
format string is not a string literal [-Werror,-Wformat-nonliteral]
At src/replay_device.cc:96:30 :
vfprintf(stream.GetFP(), format, args);

BUG= chromium:684114 
TEST=mttools builds

Change-Id: I6dfa4f2ebba56e3f0057855618a44af82005163b
Reviewed-on: https://chromium-review.googlesource.com/431303
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/8da2c778eafaa0eb961308fcb5426dde45b08c5f/mtreplay/src/replay_device.cc

Comment 5 by vapier@chromium.org, Jan 24 2017

Cc: vapier@chromium.org
i'm not sure that change was the right way to go about this.  if you add printf style function attributes to tell the compiler "format" is a format string, does that fix things ?
I tried adding "format attribute" but the addition ended up to be required all over the place. After checking with llozano@, we decided to just silence the warning here directly.
Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)

Sign in to add a comment