removed some warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1355 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -52,7 +52,7 @@ DormantNodeManager::~DormantNodeManager()
|
||||
// force unloading all currently loaded images
|
||||
loaded_addon_info *info;
|
||||
for (int32 index = 0; fAddonmap->GetPointerAt(index,&info); index++) {
|
||||
printf("Forcing unload of add-on id %d with usecount %d\n",info->addon->AddonID(), info->usecount);
|
||||
printf("Forcing unload of add-on id %ld with usecount %ld\n",info->addon->AddonID(), info->usecount);
|
||||
UnloadAddon(info->addon, info->image);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ DormantNodeManager::GetAddon(media_addon_id id)
|
||||
{
|
||||
BMediaAddOn *addon;
|
||||
|
||||
printf("DormantNodeManager::GetAddon, id %d\n",id);
|
||||
printf("DormantNodeManager::GetAddon, id %ld\n",id);
|
||||
|
||||
// first try to use a already loaded add-on
|
||||
addon = TryGetAddon(id);
|
||||
@@ -96,7 +96,7 @@ DormantNodeManager::GetAddon(media_addon_id id)
|
||||
// ok, it's not loaded, try to get the path
|
||||
BPath path;
|
||||
if (B_OK != FindAddonPath(&path, id)) {
|
||||
printf("DormantNodeManager::GetAddon: can't find path for add-on %d\n",id);
|
||||
printf("DormantNodeManager::GetAddon: can't find path for add-on %ld\n",id);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ DormantNodeManager::GetAddon(media_addon_id id)
|
||||
BMediaAddOn *newaddon;
|
||||
image_id image;
|
||||
if (B_OK != LoadAddon(&newaddon, &image, path.Path(), id)) {
|
||||
printf("DormantNodeManager::GetAddon: can't load add-on %d from path %s\n",id, path.Path());
|
||||
printf("DormantNodeManager::GetAddon: can't load add-on %ld from path %s\n",id, path.Path());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -135,15 +135,15 @@ void
|
||||
DormantNodeManager::PutAddon(media_addon_id id)
|
||||
{
|
||||
loaded_addon_info *info;
|
||||
BMediaAddOn *addon;
|
||||
image_id image;
|
||||
BMediaAddOn *addon = 0; /* avoid compiler warning */
|
||||
image_id image = 0; /* avoid compiler warning */
|
||||
bool unload;
|
||||
|
||||
printf("DormantNodeManager::PutAddon, id %d\n",id);
|
||||
printf("DormantNodeManager::PutAddon, id %ld\n",id);
|
||||
|
||||
fLock->Lock();
|
||||
if (!fAddonmap->GetPointer(id, &info)) {
|
||||
printf("DormantNodeManager::PutAddon: failed to find add-on %d\n",id);
|
||||
printf("DormantNodeManager::PutAddon: failed to find add-on %ld\n",id);
|
||||
fLock->Unlock();
|
||||
return;
|
||||
}
|
||||
@@ -152,7 +152,6 @@ DormantNodeManager::PutAddon(media_addon_id id)
|
||||
if (unload) {
|
||||
addon = info->addon;
|
||||
image = info->image;
|
||||
unload = true;
|
||||
fAddonmap->Remove(id);
|
||||
}
|
||||
fLock->Unlock();
|
||||
@@ -192,7 +191,7 @@ DormantNodeManager::RegisterAddon(const char *path)
|
||||
if (rv < B_OK)
|
||||
return 0;
|
||||
|
||||
printf("DormantNodeManager::RegisterAddon finished with id %d\n",reply.addonid);
|
||||
printf("DormantNodeManager::RegisterAddon finished with id %ld\n",reply.addonid);
|
||||
|
||||
return reply.addonid;
|
||||
}
|
||||
@@ -204,7 +203,7 @@ DormantNodeManager::UnregisterAddon(media_addon_id id)
|
||||
ASSERT(id > 0);
|
||||
xfer_server_unregister_mediaaddon msg;
|
||||
|
||||
printf("DormantNodeManager::UnregisterAddon id %d\n",id);
|
||||
printf("DormantNodeManager::UnregisterAddon id %ld\n",id);
|
||||
|
||||
port_id port;
|
||||
port = find_port("media_server port");
|
||||
|
||||
@@ -70,7 +70,6 @@ status_t SetNode(node_type type, const media_node *node, const dormant_node_info
|
||||
{
|
||||
server_set_node_request request;
|
||||
server_set_node_reply reply;
|
||||
status_t rv;
|
||||
|
||||
request.type = type;
|
||||
request.use_node = node ? true : false;
|
||||
@@ -293,7 +292,7 @@ BMediaRoster::Connect(const media_source & from,
|
||||
request1.format = *io_format;
|
||||
rv = QueryPort(from.port, PRODUCER_FORMAT_PROPOSAL, &request1, sizeof(request1), &reply1, sizeof(reply1));
|
||||
if (rv != B_OK) {
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::FormatProposal, status = %#x\n",rv);
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::FormatProposal, status = %#lx\n",rv);
|
||||
return rv;
|
||||
}
|
||||
// reply1.format now contains the format proposed by the producer
|
||||
@@ -306,7 +305,7 @@ BMediaRoster::Connect(const media_source & from,
|
||||
request2.format = reply1.format;
|
||||
rv = QueryPort(to.port, CONSUMER_ACCEPT_FORMAT, &request2, sizeof(request2), &reply2, sizeof(reply2));
|
||||
if (rv != B_OK) {
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferConsumer::AcceptFormat, status = %#x\n",rv);
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferConsumer::AcceptFormat, status = %#lx\n",rv);
|
||||
return rv;
|
||||
}
|
||||
// reply2.format now contains the format accepted by the consumer
|
||||
@@ -321,7 +320,7 @@ BMediaRoster::Connect(const media_source & from,
|
||||
strcpy(request3.name, "XXX some default name"); // XXX fix this
|
||||
rv = QueryPort(from.port, PRODUCER_PREPARE_TO_CONNECT, &request3, sizeof(request3), &reply3, sizeof(reply3));
|
||||
if (rv != B_OK) {
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::PrepareToConnect, status = %#x\n",rv);
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::PrepareToConnect, status = %#lx\n",rv);
|
||||
return rv;
|
||||
}
|
||||
// reply3.format is still our pretty media format
|
||||
@@ -338,7 +337,7 @@ BMediaRoster::Connect(const media_source & from,
|
||||
request4.with_format = reply3.format;
|
||||
con_status = QueryPort(to.port, CONSUMER_CONNECTED, &request4, sizeof(request4), &reply4, sizeof(reply4));
|
||||
if (con_status != B_OK) {
|
||||
TRACE("BMediaRoster::Connect: aborting after BBufferConsumer::Connected, status = %#x\n",con_status);
|
||||
TRACE("BMediaRoster::Connect: aborting after BBufferConsumer::Connected, status = %#lx\n",con_status);
|
||||
// we do NOT return here!
|
||||
}
|
||||
// con_status contains the status code to be supplied to BBufferProducer::Connect's status argument
|
||||
@@ -359,7 +358,7 @@ BMediaRoster::Connect(const media_source & from,
|
||||
return con_status;
|
||||
}
|
||||
if (rv != B_OK) {
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::Connect, status = %#x\n",rv);
|
||||
TRACE("BMediaRoster::Connect: aborted after BBufferProducer::Connect, status = %#lx\n",rv);
|
||||
return rv;
|
||||
}
|
||||
// reply5.name contains the name assigned to the connection by the producer
|
||||
@@ -1047,7 +1046,7 @@ BMediaRoster::InstantiateDormantNode(const dormant_node_info & in_info,
|
||||
}
|
||||
|
||||
// XXX SOMETHING IS VERY WRONG HERE
|
||||
printf("Error: BMediaRoster::InstantiateDormantNode addon_id %d, flavor_id %d, flags %#08lx\n", in_info.addon, in_info.flavor_id, flags);
|
||||
printf("Error: BMediaRoster::InstantiateDormantNode addon_id %d, flavor_id %d, flags %#08lx\n", (int)in_info.addon, (int)in_info.flavor_id, flags);
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ Queue::AddItem(void *item)
|
||||
void *
|
||||
Queue::RemoveItem()
|
||||
{
|
||||
status_t rv;
|
||||
void *item;
|
||||
|
||||
// if the semaphore is deleted by Terminate(),
|
||||
|
||||
@@ -157,7 +157,7 @@ MediaAddonServer::ScanAddOnFlavors(BMediaAddOn *addon)
|
||||
ASSERT(addon);
|
||||
ASSERT(addon->AddonID() > 0);
|
||||
|
||||
printf("MediaAddonServer::ScanAddOnFlavors: id %d\n",addon->AddonID());
|
||||
printf("MediaAddonServer::ScanAddOnFlavors: id %ld\n",addon->AddonID());
|
||||
|
||||
port = find_port("media_server port");
|
||||
if (port <= B_OK) {
|
||||
@@ -176,7 +176,7 @@ MediaAddonServer::ScanAddOnFlavors(BMediaAddOn *addon)
|
||||
newflavorcount = addon->CountFlavors();
|
||||
*flavorcount = newflavorcount;
|
||||
|
||||
printf("%d old flavors, %d new flavors\n", oldflavorcount, newflavorcount);
|
||||
printf("%ld old flavors, %ld new flavors\n", oldflavorcount, newflavorcount);
|
||||
|
||||
// during the first update (i == 0), the server removes old dormant_flavor_infos
|
||||
for (int i = 0; i < newflavorcount; i++) {
|
||||
@@ -234,8 +234,7 @@ MediaAddonServer::AddOnAdded(const char *path, ino_t file_node)
|
||||
|
||||
BMediaAddOn *addon;
|
||||
media_addon_id id;
|
||||
status_t rv;
|
||||
|
||||
|
||||
id = _DormantNodeManager->RegisterAddon(path);
|
||||
if (id <= 0) {
|
||||
printf("MediaAddonServer::AddOnAdded: failed to register add-on\n");
|
||||
|
||||
Reference in New Issue
Block a user