Enable runtime/printf
This CL changes the single `sprintf` to an `snprintf` which allows the runtime/printf lint check to be enabled. Change-Id: Ieed654a8d5f23250e4bc8ee07001489a060f8dc5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86084 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
13d88a6438
commit
69347de37b
|
@ -11,5 +11,4 @@ filter=-readability/namespace
|
||||||
filter=-runtime/explicit
|
filter=-runtime/explicit
|
||||||
filter=-runtime/indentation_namespace
|
filter=-runtime/indentation_namespace
|
||||||
filter=-runtime/int
|
filter=-runtime/int
|
||||||
filter=-runtime/printf
|
|
||||||
filter=-whitespace/empty_if_body
|
filter=-whitespace/empty_if_body
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace {
|
||||||
auto byteView = reinterpret_cast<const uint8_t*>(buffer + index);
|
auto byteView = reinterpret_cast<const uint8_t*>(buffer + index);
|
||||||
for (unsigned int b = 0; b < kBytes; ++b) {
|
for (unsigned int b = 0; b < kBytes; ++b) {
|
||||||
char buf[4];
|
char buf[4];
|
||||||
sprintf(buf, "%02X ", byteView[b]);
|
snprintf(buf, 4, "%02X ", byteView[b]);
|
||||||
result << buf;
|
result << buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue