More 'GCC4.6 variable set but not used' fixes.

This commit is contained in:
Jerome Duval
2012-02-23 20:32:12 +01:00
parent eb5f363978
commit 4bbb27e3cc
8 changed files with 9 additions and 12 deletions
-1
View File
@@ -136,7 +136,6 @@ TBarView::Draw(BRect)
BRect bounds(Bounds()); BRect bounds(Bounds());
rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT); rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT);
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_2_TINT);
SetHighColor(hilite); SetHighColor(hilite);
if (AcrossTop()) if (AcrossTop())
-1
View File
@@ -679,7 +679,6 @@ TExpandoMenuBar::DrawBackground(BRect)
BRect bounds(Bounds()); BRect bounds(Bounds());
rgb_color menuColor = ViewColor(); rgb_color menuColor = ViewColor();
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT); rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT); rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);
int32 last = CountItems() - 1; int32 last = CountItems() - 1;
-1
View File
@@ -1283,7 +1283,6 @@ TDragRegion::Draw(BRect)
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT); rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color ldark = tint_color(menuColor, 1.02); rgb_color ldark = tint_color(menuColor, 1.02);
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT); rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
rgb_color vdark = tint_color(menuColor, B_DARKEN_3_TINT);
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT); rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT); rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);
+2
View File
@@ -223,6 +223,8 @@ BHandler::MessageReceived(BMessage *message)
const char *prop; const char *prop;
status_t err = message->GetCurrentSpecifier(&cur, &specifier, &form, &prop); status_t err = message->GetCurrentSpecifier(&cur, &specifier, &form, &prop);
if (err != B_OK)
break;
bool known = false; bool known = false;
if (cur < 0 || (strcmp(prop, "Messenger") == 0)) { if (cur < 0 || (strcmp(prop, "Messenger") == 0)) {
err = reply.AddMessenger("result", this); err = reply.AddMessenger("result", this);
+2 -2
View File
@@ -1363,7 +1363,7 @@ BLooper::resolve_specifier(BHandler* target, BMessage* message)
// (e.g., the 3rd button on the 4th view) // (e.g., the 3rd button on the 4th view)
do { do {
err = message->GetCurrentSpecifier(&index, &specifier, &form, &property); err = message->GetCurrentSpecifier(&index, &specifier, &form, &property);
if (err) { if (err != B_OK) {
BMessage reply(B_REPLY); BMessage reply(B_REPLY);
reply.AddInt32("error", err); reply.AddInt32("error", err);
message->SendReply(&reply); message->SendReply(&reply);
@@ -1381,7 +1381,7 @@ BLooper::resolve_specifier(BHandler* target, BMessage* message)
// Get current specifier index (may change in ResolveSpecifier()) // Get current specifier index (may change in ResolveSpecifier())
err = message->GetCurrentSpecifier(&index); err = message->GetCurrentSpecifier(&index);
} while (newTarget && newTarget != target && !err && index >= 0); } while (newTarget && newTarget != target && err == B_OK && index >= 0);
return newTarget; return newTarget;
} }
-2
View File
@@ -2590,7 +2590,6 @@ dir_vnode_to_path(struct vnode* vnode, char* buffer, size_t bufferSize,
char nameBuffer[sizeof(struct dirent) + B_FILE_NAME_LENGTH]; char nameBuffer[sizeof(struct dirent) + B_FILE_NAME_LENGTH];
char* name = &((struct dirent*)nameBuffer)->d_name[0]; char* name = &((struct dirent*)nameBuffer)->d_name[0];
struct vnode* parentVnode; struct vnode* parentVnode;
ino_t parentID;
// lookup the parent vnode // lookup the parent vnode
if (vnode == ioContext->root) { if (vnode == ioContext->root) {
@@ -2613,7 +2612,6 @@ dir_vnode_to_path(struct vnode* vnode, char* buffer, size_t bufferSize,
if (Vnode* coveredVnode = get_covered_vnode(parentVnode)) { if (Vnode* coveredVnode = get_covered_vnode(parentVnode)) {
put_vnode(parentVnode); put_vnode(parentVnode);
parentVnode = coveredVnode; parentVnode = coveredVnode;
parentID = parentVnode->id;
} }
} }
-4
View File
@@ -1878,7 +1878,6 @@ thread_exit(void)
Thread* thread = thread_get_current_thread(); Thread* thread = thread_get_current_thread();
Team* team = thread->team; Team* team = thread->team;
Team* kernelTeam = team_get_kernel_team(); Team* kernelTeam = team_get_kernel_team();
thread_id parentID = -1;
status_t status; status_t status;
struct thread_debug_info debugInfo; struct thread_debug_info debugInfo;
team_id teamID = team->id; team_id teamID = team->id;
@@ -1998,9 +1997,6 @@ thread_exit(void)
if (deleteTeam) { if (deleteTeam) {
Team* parent = team->parent; Team* parent = team->parent;
// remember who our parent was so we can send a signal
parentID = parent->id;
// Set the team job control state to "dead" and detach the job // Set the team job control state to "dead" and detach the job
// control entry from our team struct. // control entry from our team struct.
team_set_job_control_state(team, JOB_CONTROL_STATE_DEAD, NULL, team_set_job_control_state(team, JOB_CONTROL_STATE_DEAD, NULL,
+5 -1
View File
@@ -2296,7 +2296,9 @@ page_writer(void* /*unused*/)
{ {
const uint32 kNumPages = 256; const uint32 kNumPages = 256;
uint32 writtenPages = 0; uint32 writtenPages = 0;
#ifdef TRACE_VM_PAGE
bigtime_t lastWrittenTime = 0; bigtime_t lastWrittenTime = 0;
#endif
bigtime_t pageCollectionTime = 0; bigtime_t pageCollectionTime = 0;
bigtime_t pageWritingTime = 0; bigtime_t pageWritingTime = 0;
@@ -2440,13 +2442,15 @@ page_writer(void* /*unused*/)
// debug output only... // debug output only...
writtenPages += numPages; writtenPages += numPages;
if (writtenPages >= 1024) { if (writtenPages >= 1024) {
#ifdef TRACE_VM_PAGE
bigtime_t now = system_time(); bigtime_t now = system_time();
TRACE(("page writer: wrote 1024 pages (total: %llu ms, " TRACE(("page writer: wrote 1024 pages (total: %llu ms, "
"collect: %llu ms, write: %llu ms)\n", "collect: %llu ms, write: %llu ms)\n",
(now - lastWrittenTime) / 1000, (now - lastWrittenTime) / 1000,
pageCollectionTime / 1000, pageWritingTime / 1000)); pageCollectionTime / 1000, pageWritingTime / 1000));
writtenPages -= 1024;
lastWrittenTime = now; lastWrittenTime = now;
#endif
writtenPages -= 1024;
pageCollectionTime = 0; pageCollectionTime = 0;
pageWritingTime = 0; pageWritingTime = 0;
} }