summaryrefslogtreecommitdiff
path: root/src/wm-tester/test-gravity.c
diff options
context:
space:
mode:
authorElijah Newren <newren gmail com>2006-01-20 22:03:56 +0000
committerElijah Newren <newren@src.gnome.org>2006-01-20 22:03:56 +0000
commit32d4bd6b63a9a5fe044248740e2dfa9050c1fbb6 (patch)
treea3ff366ed37c68e988ff73eb6dca50a822ca856a /src/wm-tester/test-gravity.c
parent4c10722262a8a5f0fc1f4e931867e2a4b6363199 (diff)
downloadmetacity-32d4bd6b63a9a5fe044248740e2dfa9050c1fbb6.tar.gz
metacity-32d4bd6b63a9a5fe044248740e2dfa9050c1fbb6.tar.bz2
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
Diffstat (limited to 'src/wm-tester/test-gravity.c')
-rw-r--r--src/wm-tester/test-gravity.c37
1 files changed, 14 insertions, 23 deletions
diff --git a/src/wm-tester/test-gravity.c b/src/wm-tester/test-gravity.c
index 1b6f441..8e5b581 100644
--- a/src/wm-tester/test-gravity.c
+++ b/src/wm-tester/test-gravity.c
@@ -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.
+ */
}