diff --git a/src/apps/processcontroller/PCWorld.cpp b/src/apps/processcontroller/PCWorld.cpp index d97d8b542f..e54bd4a5e6 100644 --- a/src/apps/processcontroller/PCWorld.cpp +++ b/src/apps/processcontroller/PCWorld.cpp @@ -115,10 +115,10 @@ PCApplication::ReadyToRun() // quit other eventually running instances BList list; be_roster->GetAppList(kSignature, &list); - long count = list.CountItems(); + int32 count = list.CountItems(); if (count > 1) { - for (long i = 0; i < count - 1; i++) { - BMessenger* otherme = new BMessenger(NULL, (team_id)list.ItemAt(i)); + for (int32 i = 0; i < count - 1; i++) { + BMessenger* otherme = new BMessenger(NULL, (addr_t)list.ItemAt(i)); BMessage* message = new BMessage(B_QUIT_REQUESTED); otherme->SendMessage(message); delete otherme; diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index 8f9417554c..256041afc2 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -90,7 +90,7 @@ bool gInDeskbar = false; #define addtopbottom(x) if (top) popup->AddItem(x); else popup->AddItem(x, 0) -long thread_popup(void *arg); +status_t thread_popup(void *arg); int32 gPopupFlag = 0; thread_id gPopupThreadID = 0; @@ -103,8 +103,8 @@ typedef struct { #define DEBUG_THREADS 1 -long thread_quit_application(void *arg); -long thread_debug_thread(void *arg); +status_t thread_quit_application(void *arg); +status_t thread_debug_thread(void *arg); typedef struct { thread_id thread; @@ -257,7 +257,7 @@ ProcessController::MessageReceived(BMessage *message) if (message->FindInt32("team", &team) == B_OK) { resume_thread(spawn_thread(thread_quit_application, B_TRANSLATE("Quit application"), B_NORMAL_PRIORITY, - (void*) team)); + (void*)(addr_t)team)); } break; @@ -309,7 +309,7 @@ ProcessController::MessageReceived(BMessage *message) B_TRANSLATE("Cancel"), B_TRANSLATE("Kill this thread!"), NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); alert->SetShortcut(0, B_ESCAPE); - + #define KILL 1 #endif alert->SetShortcut(0, B_ESCAPE); @@ -342,7 +342,7 @@ ProcessController::MessageReceived(BMessage *message) case 'PrTh': if (message->FindInt32("thread", &thread) == B_OK) { - long new_priority; + int32 new_priority; if (message->FindInt32("priority", &new_priority) == B_OK) set_thread_priority(thread, new_priority); } @@ -665,7 +665,7 @@ ProcessController::Update() // #pragma mark - -long +status_t thread_popup(void *arg) { Tpopup_param* param = (Tpopup_param*) arg; @@ -829,16 +829,16 @@ thread_popup(void *arg) } -long +status_t thread_quit_application(void *arg) { - BMessenger messenger(NULL, (team_id)arg); + BMessenger messenger(NULL, (addr_t)arg); messenger.SendMessage(B_QUIT_REQUESTED); return B_OK; } -long +status_t thread_debug_thread(void *arg) { Tdebug_thead_param* param = (Tdebug_thead_param*) arg; diff --git a/src/apps/processcontroller/QuitMenu.cpp b/src/apps/processcontroller/QuitMenu.cpp index a5f466f41f..1ed69b0a7d 100644 --- a/src/apps/processcontroller/QuitMenu.cpp +++ b/src/apps/processcontroller/QuitMenu.cpp @@ -72,13 +72,13 @@ QuitMenu::AttachedToWindow() for (int t = CountItems() - 1; t >= 0; t--) { QuitMenuItem* item = (QuitMenuItem*)ItemAt(t); bool found = false; - for (int a = 0; !found && (tmid = (team_id)apps.ItemAt(a)) != 0; a++) + for (int a = 0; !found && (tmid = (team_id)(addr_t)apps.ItemAt(a)) != 0; a++) if (item->Team() == tmid) found = true; if (!found) RemoveItem(t); } - for (int a = 0; (tmid = (team_id) apps.ItemAt(a)) != 0; a++) { + for (int a = 0; (tmid = (team_id)(addr_t) apps.ItemAt(a)) != 0; a++) { AddTeam(tmid); } diff --git a/src/apps/processcontroller/Utilities.cpp b/src/apps/processcontroller/Utilities.cpp index f9652b706e..cb7e64b304 100644 --- a/src/apps/processcontroller/Utilities.cpp +++ b/src/apps/processcontroller/Utilities.cpp @@ -134,10 +134,10 @@ find_self(entry_ref& ref) int32 cookie = 0; image_info info; while (get_next_image_info (0, &cookie, &info) == B_OK) { - if (((uint32)info.text <= (uint32)move_to_deskbar - && (uint32)info.text + (uint32)info.text_size > (uint32)move_to_deskbar) - || ((uint32)info.data <= (uint32)move_to_deskbar - && (uint32)info.data + (uint32)info.data_size > (uint32)move_to_deskbar)) { + if (((addr_t)info.text <= (addr_t)move_to_deskbar + && (addr_t)info.text + (size_t)info.text_size > (addr_t)move_to_deskbar) + || ((addr_t)info.data <= (addr_t)move_to_deskbar + && (addr_t)info.data + (size_t)info.data_size > (addr_t)move_to_deskbar)) { if (get_ref_for_path (info.name, &ref) == B_OK) return; }