midi kit, media_addon_server, mail_server: fixes 64 bit warnings

This commit is contained in:
Jérôme Duval
2013-05-09 18:11:19 +02:00
parent 24dba16d04
commit 01c5671de8
3 changed files with 15 additions and 14 deletions
+1 -1
View File
@@ -164,6 +164,6 @@ BMidiText::_WaitAndPrint(uint32 time)
SnoozeUntil(time); SnoozeUntil(time);
printf("%lu: ", time - fStartTime); printf("%" B_PRIu32 ": ", time - fStartTime);
} }
+1 -1
View File
@@ -208,7 +208,7 @@ Error::GetPreferredSize(float *width, float *height)
BTextView *view = static_cast<BTextView *>(FindView("error_display")); BTextView *view = static_cast<BTextView *>(FindView("error_display"));
*width = view->Frame().Width() + 20; *width = view->Frame().Width() + 20;
*height = view->TextHeight(0, LONG_MAX) + 3; *height = view->TextHeight(0, INT32_MAX) + 3;
} }
+13 -12
View File
@@ -426,8 +426,8 @@ MediaAddonServer::_HandleMessage(int32 code, const void* data, size_t size)
break; break;
default: default:
ERROR("media_addon_server: received unknown message code %#08lx\n", ERROR("media_addon_server: received unknown message code %#08"
code); B_PRIx32 "\n", code);
break; break;
} }
} }
@@ -605,13 +605,14 @@ MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)
void void
MediaAddonServer::_DestroyInstantiatedFlavors(AddOnInfo& info) MediaAddonServer::_DestroyInstantiatedFlavors(AddOnInfo& info)
{ {
printf("MediaAddonServer::_DestroyInstantiatedFlavors addon %ld\n", info.id); printf("MediaAddonServer::_DestroyInstantiatedFlavors addon %" B_PRId32
"\n", info.id);
NodeVector::iterator iterator = info.active_flavors.begin(); NodeVector::iterator iterator = info.active_flavors.begin();
for (; iterator != info.active_flavors.end(); iterator++) { for (; iterator != info.active_flavors.end(); iterator++) {
media_node& node = *iterator; media_node& node = *iterator;
printf("node %ld\n", node.node); printf("node %" B_PRId32 "\n", node.node);
if ((node.kind & B_TIME_SOURCE) != 0 if ((node.kind & B_TIME_SOURCE) != 0
&& (fMediaRoster->StopTimeSource(node, 0, true) != B_OK)) { && (fMediaRoster->StopTimeSource(node, 0, true) != B_OK)) {
@@ -709,7 +710,7 @@ MediaAddonServer::_InstantiatePhysicalInputsAndOutputs(AddOnInfo& info)
const flavor_info* flavorinfo; const flavor_info* flavorinfo;
if (info.addon->GetFlavorAt(i, &flavorinfo) != B_OK) { if (info.addon->GetFlavorAt(i, &flavorinfo) != B_OK) {
ERROR("MediaAddonServer::InstantiatePhysialInputsAndOutputs " ERROR("MediaAddonServer::InstantiatePhysialInputsAndOutputs "
"GetFlavorAt failed for index %ld!\n", i); "GetFlavorAt failed for index %" B_PRId32 "!\n", i);
continue; continue;
} }
if ((flavorinfo->kinds & (B_PHYSICAL_INPUT | B_PHYSICAL_OUTPUT)) != 0) { if ((flavorinfo->kinds & (B_PHYSICAL_INPUT | B_PHYSICAL_OUTPUT)) != 0) {
@@ -726,8 +727,8 @@ MediaAddonServer::_InstantiatePhysicalInputsAndOutputs(AddOnInfo& info)
dormantNodeInfo, &node); dormantNodeInfo, &node);
if (status != B_OK) { if (status != B_OK) {
ERROR("MediaAddonServer::InstantiatePhysialInputsAndOutputs " ERROR("MediaAddonServer::InstantiatePhysialInputsAndOutputs "
"Couldn't instantiate node flavor, internal_id %ld, " "Couldn't instantiate node flavor, internal_id %" B_PRId32
"name %s\n", flavorinfo->internal_id, flavorinfo->name); ", name %s\n", flavorinfo->internal_id, flavorinfo->name);
} else { } else {
TRACE("Node created!\n"); TRACE("Node created!\n");
info.active_flavors.push_back(node); info.active_flavors.push_back(node);
@@ -756,12 +757,12 @@ MediaAddonServer::_InstantiateAutostartFlavors(AddOnInfo& info)
else if (status != B_OK) else if (status != B_OK)
break; break;
printf("started node %ld\n", index); printf("started node %" B_PRId32 "\n", index);
status = MediaRosterEx(fMediaRoster)->RegisterNode(node, info.id, status = MediaRosterEx(fMediaRoster)->RegisterNode(node, info.id,
internalID); internalID);
if (status != B_OK) { if (status != B_OK) {
ERROR("failed to register node %ld\n", index); ERROR("failed to register node %" B_PRId32 "\n", index);
node->Release(); node->Release();
} else { } else {
MediaRosterEx(fMediaRoster)->IncrementAddonFlavorInstancesCount( MediaRosterEx(fMediaRoster)->IncrementAddonFlavorInstancesCount(
@@ -782,7 +783,7 @@ MediaAddonServer::_AddOnRemoved(ino_t fileNode)
FileMap::iterator foundFile = fFileMap.find(fileNode); FileMap::iterator foundFile = fFileMap.find(fileNode);
if (foundFile == fFileMap.end()) { if (foundFile == fFileMap.end()) {
ERROR("MediaAddonServer::_AddOnRemoved: inode %Ld removed, but no " ERROR("MediaAddonServer::_AddOnRemoved: inode %" B_PRIdINO " removed, but no "
"media add-on found\n", fileNode); "media add-on found\n", fileNode);
return; return;
} }
@@ -795,7 +796,7 @@ MediaAddonServer::_AddOnRemoved(ino_t fileNode)
if (foundInfo == fInfoMap.end()) { if (foundInfo == fInfoMap.end()) {
ERROR("MediaAddonServer::_AddOnRemoved: couldn't get addon info for " ERROR("MediaAddonServer::_AddOnRemoved: couldn't get addon info for "
"add-on %ld\n", id); "add-on %" B_PRId32 "\n", id);
oldFlavorCount = 1000; oldFlavorCount = 1000;
} else { } else {
AddOnInfo& info = foundInfo->second; AddOnInfo& info = foundInfo->second;
@@ -806,7 +807,7 @@ MediaAddonServer::_AddOnRemoved(ino_t fileNode)
if (info.addon) { if (info.addon) {
ERROR("MediaAddonServer::_AddOnRemoved: couldn't unload addon " ERROR("MediaAddonServer::_AddOnRemoved: couldn't unload addon "
"%ld since flavors are in use\n", id); "%" B_PRId32 " since flavors are in use\n", id);
} }
fInfoMap.erase(foundInfo); fInfoMap.erase(foundInfo);