From 48350f1a72b010a532b54c818d64e9f69d797bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 4 May 2013 13:48:24 +0200 Subject: [PATCH] bluetooth_server: some 64 bit fixes --- src/servers/bluetooth/BluetoothServer.cpp | 10 ++++++---- src/servers/bluetooth/HCITransportAccessor.cpp | 8 ++++---- src/servers/bluetooth/LocalDeviceHandler.cpp | 5 +++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/servers/bluetooth/BluetoothServer.cpp b/src/servers/bluetooth/BluetoothServer.cpp index 40da9daf1d..d5ea861934 100644 --- a/src/servers/bluetooth/BluetoothServer.cpp +++ b/src/servers/bluetooth/BluetoothServer.cpp @@ -344,7 +344,8 @@ BluetoothServer::HandleAcquireLocalDevice(BMessage* message, BMessage* reply) for (int index = lastIndex + 1; index < fLocalDevicesList.CountItems(); index++) { lDeviceImpl= fLocalDevicesList.ItemAt(index); - printf("Requesting local device %ld\n", lDeviceImpl->GetID()); + printf("Requesting local device %" B_PRId32 "\n", + lDeviceImpl->GetID()); if (lDeviceImpl != NULL && lDeviceImpl->Available()) { Output::Instance()->Postf(BLACKBOARD_KIT, "Device available: %lx\n", lDeviceImpl->GetID()); @@ -357,7 +358,8 @@ BluetoothServer::HandleAcquireLocalDevice(BMessage* message, BMessage* reply) if (lDeviceImpl == NULL) { for (int index = 0; index <= lastIndex ; index ++) { lDeviceImpl = fLocalDevicesList.ItemAt(index); - printf("Requesting local device %ld\n", lDeviceImpl->GetID()); + printf("Requesting local device %" B_PRId32 "\n", + lDeviceImpl->GetID()); if (lDeviceImpl != NULL && lDeviceImpl->Available()) { Output::Instance()->Postf(BLACKBOARD_KIT, "Device available: %lx\n", lDeviceImpl->GetID()); @@ -600,7 +602,7 @@ BluetoothServer::_InstallDeskbarIcon() status_t res = deskbar.AddItem(&appInfo.ref); if (res != B_OK) { - printf("Failed adding deskbar icon: %ld\n", res); + printf("Failed adding deskbar icon: %" B_PRId32 "\n", res); } } @@ -611,7 +613,7 @@ BluetoothServer::_RemoveDeskbarIcon() BDeskbar deskbar; status_t res = deskbar.RemoveItem(kDeskbarItemName); if (res != B_OK) { - printf("Failed removing Deskbar icon: %ld: \n", res); + printf("Failed removing Deskbar icon: %" B_PRId32 ": \n", res); } } diff --git a/src/servers/bluetooth/HCITransportAccessor.cpp b/src/servers/bluetooth/HCITransportAccessor.cpp index 2c070d6697..8e64949323 100644 --- a/src/servers/bluetooth/HCITransportAccessor.cpp +++ b/src/servers/bluetooth/HCITransportAccessor.cpp @@ -20,11 +20,11 @@ HCITransportAccessor::HCITransportAccessor(BPath* path) : HCIDelegate(path) if (fDescriptor > 0) { // find out which ID was assigned status = ioctl(fDescriptor, GET_HCI_ID, &fIdentifier, 0); - printf("%s: hid retrieved %lx status=%ld\n", __FUNCTION__, - fIdentifier, status); + printf("%s: hid retrieved %" B_PRIx32 " status=%" B_PRId32 "\n", + __FUNCTION__, fIdentifier, status); } else { - printf("%s: Device driver %s could not be opened %ld\n", __FUNCTION__, - path->Path(), fIdentifier); + printf("%s: Device driver %s could not be opened %" B_PRId32 "\n", + __FUNCTION__, path->Path(), fIdentifier); fIdentifier = B_ERROR; } diff --git a/src/servers/bluetooth/LocalDeviceHandler.cpp b/src/servers/bluetooth/LocalDeviceHandler.cpp index 8a0e7ff738..7d3936a6fe 100644 --- a/src/servers/bluetooth/LocalDeviceHandler.cpp +++ b/src/servers/bluetooth/LocalDeviceHandler.cpp @@ -93,11 +93,12 @@ LocalDeviceHandler::ClearWantedEvent(BMessage* msg, uint16 event, uint16 opcode) // for each Event while (msg->FindInt16("eventExpected", eventIndex, &eventFound) == B_OK) { - printf("%s:Event expected %d@%ld...\n", __FUNCTION__, event, eventIndex); + printf("%s:Event expected %d@%" B_PRId32 "...\n", __FUNCTION__, event, + eventIndex); if (eventFound == event) { - printf("%s:Event matches@%ld", __FUNCTION__, eventIndex); + printf("%s:Event matches@%" B_PRId32 "\n", __FUNCTION__, eventIndex); // there is an opcode specified if (opcode != 0) {