Commit c8cd473e authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Fix %x/DWORD printf mismatches in bluetooth

In order to enable clang-cl's printf format string mismatch checking we
need to fix a few dozen existing errors. These are mostly places where
DWORD (unsigned long) is printed with %X - an 'l' is needed. This change
fixes three of these and these files now build cleanly with clang-cl
with PRINTF_FORMAT checking enabled.

R=scheib@chromium.org
BUG=751171

Change-Id: I6321593fb579f9c70f8adb5f885daffd0e5a6c74
Reviewed-on: https://chromium-review.googlesource.com/598827
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: default avatarVincent Scheib <scheib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491856}
parent f50a9a3d
......@@ -74,11 +74,11 @@ void ExtractUuid(const SDP_ELEMENT_DATA& uuid_data,
*uuid = device::BluetoothUUID(uuid_hex);
} else if (inner_uuid_data.specificType == SDP_ST_UUID32) {
std::string uuid_hex =
base::StringPrintf("%08x", inner_uuid_data.data.uuid32);
base::StringPrintf("%08lx", inner_uuid_data.data.uuid32);
*uuid = device::BluetoothUUID(uuid_hex);
} else if (inner_uuid_data.specificType == SDP_ST_UUID128) {
*uuid = device::BluetoothUUID(base::StringPrintf(
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
"%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
inner_uuid_data.data.uuid128.Data1,
inner_uuid_data.data.uuid128.Data2,
inner_uuid_data.data.uuid128.Data3,
......
......@@ -228,7 +228,7 @@ BluetoothUUID BluetoothTaskManagerWin::BluetoothLowEnergyUuidToBluetoothUuid(
return BluetoothUUID(uuid_hex);
} else {
return BluetoothUUID(base::StringPrintf(
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
"%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
bth_le_uuid.Value.LongUuid.Data1, bth_le_uuid.Value.LongUuid.Data2,
bth_le_uuid.Value.LongUuid.Data3, bth_le_uuid.Value.LongUuid.Data4[0],
bth_le_uuid.Value.LongUuid.Data4[1],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment