summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-09-20 06:47:42 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-09-20 06:47:42 +0300
commitbda6bae0f7a5cb11d3ff70ec45f50abbc87606f4 (patch)
tree27fd45eacf7e002b5de42980ef7d7ceba57d5cc2
parentb5de53c7f6c6bb40b7e40f1b60892feaa6880818 (diff)
downloadmetacity-bda6bae0f7a5cb11d3ff70ec45f50abbc87606f4.tar.gz
testboxes: fix build warnings
-rw-r--r--src/core/testboxes.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/core/testboxes.c b/src/core/testboxes.c
index 40a3278f..3bd4df0a 100644
--- a/src/core/testboxes.c
+++ b/src/core/testboxes.c
@@ -29,7 +29,7 @@
#define NUM_RANDOM_RUNS 10000
static void
-init_random_ness ()
+init_random_ness (void)
{
srand(time(NULL));
}
@@ -98,7 +98,7 @@ new_xinerama_edge (int x, int y, int width, int height, int side_type)
}
static void
-test_area ()
+test_area (void)
{
MetaRectangle temp;
int i;
@@ -115,7 +115,7 @@ test_area ()
}
static void
-test_intersect ()
+test_intersect (void)
{
MetaRectangle a = {100, 200, 50, 40};
MetaRectangle b = { 0, 50, 110, 152};
@@ -143,7 +143,7 @@ test_intersect ()
}
static void
-test_equal ()
+test_equal (void)
{
MetaRectangle a = {10, 12, 4, 18};
MetaRectangle b = a;
@@ -162,7 +162,7 @@ test_equal ()
}
static void
-test_overlap_funcs ()
+test_overlap_funcs (void)
{
MetaRectangle temp1, temp2;
int i;
@@ -185,7 +185,7 @@ test_overlap_funcs ()
}
static void
-test_basic_fitting ()
+test_basic_fitting (void)
{
MetaRectangle temp1, temp2, temp3;
int i;
@@ -275,6 +275,8 @@ get_strut_list (int which)
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 40, wc));
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 20, wc));
break;
+ default:
+ break;
}
return ans;
@@ -320,6 +322,7 @@ get_xinerama_edges (int which_xinerama_set, int which_strut_set)
GList *ret;
GSList *struts;
GList *xins;
+ MetaRectangle screenrect;
xins = NULL;
g_assert (which_xinerama_set >=0 && which_xinerama_set <= 3);
@@ -341,11 +344,12 @@ get_xinerama_edges (int which_xinerama_set, int which_strut_set)
xins = g_list_prepend (xins, new_meta_rect ( 0, 600, 800, 600));
xins = g_list_prepend (xins, new_meta_rect (800, 600, 800, 600));
break;
+ default:
+ break;
}
ret = NULL;
- MetaRectangle screenrect;
screenrect.x = 0;
screenrect.y = 0;
screenrect.width = 1600;
@@ -584,7 +588,7 @@ verify_lists_are_equal (GList *code, GList *answer)
}
static void
-test_regions_okay ()
+test_regions_okay (void)
{
GList* region;
GList* tmp;
@@ -676,7 +680,7 @@ test_regions_okay ()
}
static void
-test_region_fitting ()
+test_region_fitting (void)
{
GList* region;
MetaRectangle rect;
@@ -720,7 +724,7 @@ test_region_fitting ()
}
static void
-test_clamping_to_region ()
+test_clamping_to_region (void)
{
GList* region;
MetaRectangle rect;
@@ -837,7 +841,7 @@ rect_overlaps_region (const GList *spanning_rects,
gboolean time_to_print = FALSE;
static void
-test_clipping_to_region ()
+test_clipping_to_region (void)
{
GList* region;
MetaRectangle rect, temp;
@@ -899,7 +903,7 @@ test_clipping_to_region ()
}
static void
-test_shoving_into_region ()
+test_shoving_into_region (void)
{
GList* region;
MetaRectangle rect, temp;
@@ -1016,7 +1020,7 @@ verify_edge_lists_are_equal (GList *code, GList *answer)
}
static void
-test_find_onscreen_edges ()
+test_find_onscreen_edges (void)
{
GList* edges;
GList* tmp;
@@ -1149,7 +1153,7 @@ test_find_onscreen_edges ()
}
static void
-test_find_nonintersected_xinerama_edges ()
+test_find_nonintersected_xinerama_edges (void)
{
GList* edges;
GList* tmp;
@@ -1238,7 +1242,7 @@ test_find_nonintersected_xinerama_edges ()
}
static void
-test_gravity_resize ()
+test_gravity_resize (void)
{
MetaRectangle oldrect, rect, temp;
@@ -1339,7 +1343,7 @@ test_gravity_resize ()
}
static void
-test_find_closest_point_to_line ()
+test_find_closest_point_to_line (void)
{
double x1, y1, x2, y2, px, py, rx, ry;
double answer_x, answer_y;
@@ -1391,7 +1395,7 @@ test_find_closest_point_to_line ()
}
int
-main()
+main (int argc, char **argv)
{
init_random_ness ();
test_area ();