Patch from Kjartan Maraas to fix a lot of tiny issues (unused variable

2006-01-20  Elijah Newren  <newren gmail com>

	* src/async-getprop.c:
	* src/common.h:
	* src/display.c:
	* src/eggaccelerators.c:
	* src/frames.c:
	* src/gradient.c:
	* src/iconcache.c:
	* src/keybindings.c:
	* src/metaaccellabel.c:
	* src/place.c:
	* src/prefs.c:
	* src/preview-widget.c:
	* src/screen.c:
	* src/session.c:
	* src/stack.c:
	* src/tabpopup.c:
	* src/theme-viewer.c:
	* src/theme.c:
	* src/window-props.c:
	* src/window.c:
	* src/workspace.c:
	* src/tools/metacity-window-demo.c:
	* src/wm-tester/test-gravity.c:
	* src/wm-tester/test-resizing.c:
	* src/wm-tester/test-size-hints.c:
	Patch from Kjartan Maraas to fix a lot of tiny issues (unused
	variable removal, making unused variables used again, correction
	of types passed/declared for printf arguments, removal of unneeded
	breaks and returns, dead code removal, dead code revival, renaming
	to prevent shadowed variables, declaring unexported functions as
	static) spotted by the intel compiler.  #321439
This commit is contained in:
Elijah Newren
2006-01-20 22:03:56 +00:00
committed by Elijah Newren
parent 4c10722262
commit 32d4bd6b63
25 changed files with 140 additions and 223 deletions

View File

@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
int gravities[10] = {
static int gravities[10] = {
NorthWestGravity,
NorthGravity,
NorthEastGravity,
@ -21,19 +21,19 @@ typedef struct
int x, y, width, height;
} Rectangle;
Window windows[10];
int doubled[10] = { 0, };
Rectangle window_rects[10];
static Window windows[10];
static int doubled[10] = { 0, };
static Rectangle window_rects[10];
#define WINDOW_WIDTH 100
#define WINDOW_HEIGHT 100
int x_offset[3] = { 0, - WINDOW_WIDTH/2, -WINDOW_WIDTH };
int y_offset[3] = { 0, - WINDOW_HEIGHT/2, -WINDOW_HEIGHT };
double screen_x_fraction[3] = { 0, 0.5, 1.0 };
double screen_y_fraction[3] = { 0, 0.5, 1.0 };
int screen_width;
int screen_height;
static int x_offset[3] = { 0, - WINDOW_WIDTH/2, -WINDOW_WIDTH };
static int y_offset[3] = { 0, - WINDOW_HEIGHT/2, -WINDOW_HEIGHT };
static double screen_x_fraction[3] = { 0, 0.5, 1.0 };
static double screen_y_fraction[3] = { 0, 0.5, 1.0 };
static int screen_width;
static int screen_height;
static const char*
window_gravity_to_string (int gravity)
@ -42,37 +42,26 @@ window_gravity_to_string (int gravity)
{
case NorthWestGravity:
return "NorthWestGravity";
break;
case NorthGravity:
return "NorthGravity";
break;
case NorthEastGravity:
return "NorthEastGravity";
break;
case WestGravity:
return "WestGravity";
break;
case CenterGravity:
return "CenterGravity";
break;
case EastGravity:
return "EastGravity";
break;
case SouthWestGravity:
return "SouthWestGravity";
break;
case SouthGravity:
return "SouthGravity";
break;
case SouthEastGravity:
return "SouthEastGravity";
break;
case StaticGravity:
return "StaticGravity";
break;
default:
return "NorthWestGravity";
break;
}
}
@ -311,7 +300,9 @@ int main (int argc, char **argv)
}
}
}
return 0;
/* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
}

View File

@ -249,7 +249,9 @@ main (int argc, char **argv)
redraw_pending = FALSE;
}
}
return 0;
/* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
}

View File

@ -128,7 +128,9 @@ main (int argc, char **argv)
redraw_pending = FALSE;
}
}
return 0;
/* This program has an infinite loop above so a return statement would
* just cause compiler warnings.
*/
}