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

This commit is contained in:
Jerome Duval 2012-02-12 15:46:21 +01:00
parent eb5f363978
commit 4bbb27e3cc
8 changed files with 9 additions and 12 deletions

View File

@ -136,7 +136,6 @@ TBarView::Draw(BRect)
BRect bounds(Bounds());
rgb_color hilite = tint_color(ViewColor(), B_DARKEN_1_TINT);
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_2_TINT);
SetHighColor(hilite);
if (AcrossTop())

View File

@ -679,7 +679,6 @@ TExpandoMenuBar::DrawBackground(BRect)
BRect bounds(Bounds());
rgb_color menuColor = ViewColor();
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);
int32 last = CountItems() - 1;

View File

@ -1283,7 +1283,6 @@ TDragRegion::Draw(BRect)
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color ldark = tint_color(menuColor, 1.02);
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 light = tint_color(menuColor, B_LIGHTEN_2_TINT);

View File

@ -223,6 +223,8 @@ BHandler::MessageReceived(BMessage *message)
const char *prop;
status_t err = message->GetCurrentSpecifier(&cur, &specifier, &form, &prop);
if (err != B_OK)
break;
bool known = false;
if (cur < 0 || (strcmp(prop, "Messenger") == 0)) {
err = reply.AddMessenger("result", this);

View File

@ -1363,7 +1363,7 @@ BLooper::resolve_specifier(BHandler* target, BMessage* message)
// (e.g., the 3rd button on the 4th view)
do {
err = message->GetCurrentSpecifier(&index, &specifier, &form, &property);
if (err) {
if (err != B_OK) {
BMessage reply(B_REPLY);
reply.AddInt32("error", err);
message->SendReply(&reply);
@ -1381,7 +1381,7 @@ BLooper::resolve_specifier(BHandler* target, BMessage* message)
// Get current specifier index (may change in ResolveSpecifier())
err = message->GetCurrentSpecifier(&index);
} while (newTarget && newTarget != target && !err && index >= 0);
} while (newTarget && newTarget != target && err == B_OK && index >= 0);
return newTarget;
}

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* name = &((struct dirent*)nameBuffer)->d_name[0];
struct vnode* parentVnode;
ino_t parentID;
// lookup the parent vnode
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)) {
put_vnode(parentVnode);
parentVnode = coveredVnode;
parentID = parentVnode->id;
}
}

View File

@ -1878,7 +1878,6 @@ thread_exit(void)
Thread* thread = thread_get_current_thread();
Team* team = thread->team;
Team* kernelTeam = team_get_kernel_team();
thread_id parentID = -1;
status_t status;
struct thread_debug_info debugInfo;
team_id teamID = team->id;
@ -1998,9 +1997,6 @@ thread_exit(void)
if (deleteTeam) {
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
// control entry from our team struct.
team_set_job_control_state(team, JOB_CONTROL_STATE_DEAD, NULL,

View File

@ -2296,7 +2296,9 @@ page_writer(void* /*unused*/)
{
const uint32 kNumPages = 256;
uint32 writtenPages = 0;
#ifdef TRACE_VM_PAGE
bigtime_t lastWrittenTime = 0;
#endif
bigtime_t pageCollectionTime = 0;
bigtime_t pageWritingTime = 0;
@ -2440,13 +2442,15 @@ page_writer(void* /*unused*/)
// debug output only...
writtenPages += numPages;
if (writtenPages >= 1024) {
#ifdef TRACE_VM_PAGE
bigtime_t now = system_time();
TRACE(("page writer: wrote 1024 pages (total: %llu ms, "
"collect: %llu ms, write: %llu ms)\n",
(now - lastWrittenTime) / 1000,
pageCollectionTime / 1000, pageWritingTime / 1000));
writtenPages -= 1024;
lastWrittenTime = now;
#endif
writtenPages -= 1024;
pageCollectionTime = 0;
pageWritingTime = 0;
}