]> granicus.if.org Git - postgis/commitdiff
Making test methods static to avoid compiler warnings.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 23 Feb 2010 22:14:07 +0000 (22:14 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 23 Feb 2010 22:14:07 +0000 (22:14 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5331 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_algorithm.c
liblwgeom/cunit/cu_geodetic.c
liblwgeom/cunit/cu_homogenize.c
liblwgeom/cunit/cu_libgeom.c
liblwgeom/cunit/cu_measures.c
liblwgeom/cunit/cu_print.c

index 2be14ea7e7ed61292fc870ddd9f0d213e5de84c5..3c14a2f06bdb9f50ad18406fe9bf4edba66b2421 100644 (file)
@@ -35,7 +35,7 @@ LWGEOM_PARSER_RESULT parse_result;
 ** The suite initialization function.
 ** Create any re-used objects.
 */
-int init_cg_suite(void)
+static int init_cg_suite(void)
 {
        pa21 = ptarray_construct(0, 0, 2);
        pa22 = ptarray_construct(0, 0, 2);
@@ -49,7 +49,7 @@ int init_cg_suite(void)
 ** The suite cleanup function.
 ** Frees any global objects.
 */
-int clean_cg_suite(void)
+static int clean_cg_suite(void)
 {
        if ( l21 ) lwline_free(l21);
        if ( l22 ) lwline_free(l22);
@@ -59,7 +59,7 @@ int clean_cg_suite(void)
 /*
 ** Test left/right side.
 */
-void test_lw_segment_side(void)
+static void test_lw_segment_side(void)
 {
        double rv = 0.0;
        POINT2D p1, p2, q;
@@ -94,7 +94,7 @@ void test_lw_segment_side(void)
 /*
 ** Test crossings side.
 */
-void test_lw_segment_intersects(void)
+static void test_lw_segment_intersects(void)
 {
 
 #define setpoint(p, x1, y1) {(p).x = (x1); (p).y = (y1);}
@@ -236,7 +236,7 @@ void test_lw_segment_intersects(void)
 
 }
 
-void test_lwline_crossing_short_lines(void)
+static void test_lwline_crossing_short_lines(void)
 {
 
        POINT4D p;
@@ -299,7 +299,7 @@ void test_lwline_crossing_short_lines(void)
 
 }
 
-void test_lwline_crossing_long_lines(void)
+static void test_lwline_crossing_long_lines(void)
 {
        LWLINE *l51;
        LWLINE *l52;
@@ -359,7 +359,7 @@ void test_lwline_crossing_long_lines(void)
 }
 
 
-void test_lwline_crossing_bugs(void)
+static void test_lwline_crossing_bugs(void)
 {
        LWLINE *l1;
        LWLINE *l2;
@@ -373,7 +373,7 @@ void test_lwline_crossing_bugs(void)
 
 }
 
-void test_lwpoint_set_ordinate(void)
+static void test_lwpoint_set_ordinate(void)
 {
        POINT4D p;
 
@@ -393,7 +393,7 @@ void test_lwpoint_set_ordinate(void)
 
 }
 
-void test_lwpoint_get_ordinate(void)
+static void test_lwpoint_get_ordinate(void)
 {
        POINT4D p;
 
@@ -409,7 +409,7 @@ void test_lwpoint_get_ordinate(void)
 
 }
 
-void test_lwpoint_interpolate(void)
+static void test_lwpoint_interpolate(void)
 {
        POINT4D p, q, r;
        int rv = 0;
@@ -438,7 +438,7 @@ void test_lwpoint_interpolate(void)
 
 }
 
-void test_lwline_clip(void)
+static void test_lwline_clip(void)
 {
        LWCOLLECTION *c;
        LWLINE *line = NULL;
@@ -548,7 +548,7 @@ void test_lwline_clip(void)
 
 }
 
-void test_lwmline_clip(void)
+static void test_lwmline_clip(void)
 {
        LWCOLLECTION *c;
        char *ewkt;
@@ -644,7 +644,7 @@ void test_lwmline_clip(void)
 
 
 
-void test_lwline_clip_big(void)
+static void test_lwline_clip_big(void)
 {
        POINTARRAY *pa = ptarray_construct(1, 0, 3);
        LWLINE *line = lwline_construct(-1, NULL, pa);
@@ -677,7 +677,7 @@ void test_lwline_clip_big(void)
        lwline_free(line);
 }
 
-void test_geohash_precision(void)
+static void test_geohash_precision(void)
 {
        BOX3D bbox;
        BOX3D bounds;
@@ -709,7 +709,7 @@ void test_geohash_precision(void)
 
 }
 
-void test_geohash_point(void)
+static void test_geohash_point(void)
 {
        char *geohash;
 
@@ -730,7 +730,7 @@ void test_geohash_point(void)
 
 }
 
-void test_geohash(void)
+static void test_geohash(void)
 {
        LWPOINT *lwpoint = NULL;
        LWLINE *lwline = NULL;
index 543dc4ae71c262c9baa29d706be9116e3706cf79..a44165c9812b88a4c8a0f942666f053fb8865927 100644 (file)
@@ -60,14 +60,14 @@ static void point_rad2deg(GEOGRAPHIC_POINT *p)
        p->lon = rad2deg(p->lon);
 }
 
-void test_signum(void)
+static void test_signum(void)
 {
        CU_ASSERT_EQUAL(signum(-5.0),-1);
        CU_ASSERT_EQUAL(signum(5.0),1);
 }
 
 
-void test_gbox_from_spherical_coordinates(void)
+static void test_gbox_from_spherical_coordinates(void)
 {
 #if RANDOM_TEST
        const double gtolerance = 0.000001;
@@ -143,7 +143,7 @@ void test_gbox_from_spherical_coordinates(void)
 
 #include "cu_geodetic_data.h"
 
-void test_gserialized_get_gbox_geocentric(void)
+static void test_gserialized_get_gbox_geocentric(void)
 {
        LWGEOM *lwg;
        GSERIALIZED *g;
@@ -216,7 +216,7 @@ static void point_set(double lon, double lat, GEOGRAPHIC_POINT *p)
        point_deg2rad(p);
 }
 
-void test_clairaut(void)
+static void test_clairaut(void)
 {
 
        GEOGRAPHIC_POINT gs, ge;
@@ -254,7 +254,7 @@ void test_clairaut(void)
        CU_ASSERT_DOUBLE_EQUAL(v_out_bottom.lon, g_out_bottom.lon, 0.000001);
 }
 
-void test_edge_intersection(void)
+static void test_edge_intersection(void)
 {
        GEOGRAPHIC_EDGE e1, e2;
        GEOGRAPHIC_POINT g;
@@ -414,7 +414,7 @@ void test_edge_intersection(void)
 
 }
 
-void test_edge_distance_to_point(void)
+static void test_edge_distance_to_point(void)
 {
        GEOGRAPHIC_EDGE e;
        GEOGRAPHIC_POINT g;
@@ -442,7 +442,7 @@ void test_edge_distance_to_point(void)
 
 }
 
-void test_edge_distance_to_edge(void)
+static void test_edge_distance_to_edge(void)
 {
        GEOGRAPHIC_EDGE e1, e2;
        GEOGRAPHIC_POINT c1, c2;
@@ -481,7 +481,7 @@ static LWGEOM* lwgeom_over_gserialized(char *wkt)
        return lwgeom_from_gserialized(g);
 }
 
-void test_lwgeom_check_geodetic(void)
+static void test_lwgeom_check_geodetic(void)
 {
        LWGEOM *geom;
        int i = 0;
@@ -522,7 +522,7 @@ void test_lwgeom_check_geodetic(void)
 }
 
 
-void test_gbox_calculation(void)
+static void test_gbox_calculation(void)
 {
 
        LWGEOM *geom;
@@ -561,7 +561,7 @@ void test_gbox_calculation(void)
        lwfree(gbox);
 }
 
-void test_gserialized_from_lwgeom(void)
+static void test_gserialized_from_lwgeom(void)
 {
        LWGEOM *geom;
        GSERIALIZED *g;
@@ -597,7 +597,7 @@ void test_gserialized_from_lwgeom(void)
 
 }
 
-void test_ptarray_point_in_ring(void)
+static void test_ptarray_point_in_ring(void)
 {
        LWGEOM *lwg;
        LWPOLY *poly;
@@ -742,7 +742,7 @@ void test_ptarray_point_in_ring(void)
 
 }
 
-void test_lwpoly_covers_point2d(void)
+static void test_lwpoly_covers_point2d(void)
 {
        LWPOLY *poly;
        LWGEOM *lwg;
@@ -763,7 +763,7 @@ void test_lwpoly_covers_point2d(void)
 }
 
 
-void test_lwgeom_distance_sphere(void)
+static void test_lwgeom_distance_sphere(void)
 {
        LWGEOM *lwg1, *lwg2;
        GBOX gbox1, gbox2;
@@ -858,7 +858,7 @@ void test_lwgeom_distance_sphere(void)
 
 }
 
-void test_spheroid_distance(void)
+static void test_spheroid_distance(void)
 {
        GEOGRAPHIC_POINT g1, g2;
        double d;
@@ -899,7 +899,7 @@ void test_spheroid_distance(void)
 
 }
 
-void test_spheroid_area(void)
+static void test_spheroid_area(void)
 {
        LWGEOM *lwg;
        GBOX gbox;
index a75af70fefcd78a13743bcbf80474a492052a43d..8df5e0e1476c4dfc586ce005490a896c6136151b 100644 (file)
@@ -48,7 +48,7 @@ static void do_coll_test(char * in, char * out)
 }
 
 
-void test_coll_point(void)
+static void test_coll_point(void)
 {
        do_coll_test("GEOMETRYCOLLECTION(POINT(1 2))",
                     "POINT(1 2)");
@@ -70,7 +70,7 @@ void test_coll_point(void)
 }
 
 
-void test_coll_line(void)
+static void test_coll_line(void)
 {
        do_coll_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4))",
                     "LINESTRING(1 2,3 4)");
@@ -92,7 +92,7 @@ void test_coll_line(void)
 }
 
 
-void test_coll_poly(void)
+static void test_coll_poly(void)
 {
        do_coll_test("GEOMETRYCOLLECTION(POLYGON((1 2,3 4,5 6,1 2)))",
                     "POLYGON((1 2,3 4,5 6,1 2))");
@@ -114,7 +114,7 @@ void test_coll_poly(void)
 }
 
 
-void test_coll_coll(void)
+static void test_coll_coll(void)
 {
        /* Two different types together must produce a Collection as output */
        do_coll_test("GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))",
@@ -154,7 +154,7 @@ void test_coll_coll(void)
 }
 
 
-void test_geom(void)
+static void test_geom(void)
 {
        /* Already simple geometry */
        do_geom_test("POINT(1 2)",
index 814deaf7d06866bea5b414e82341e8b450ffa346..cfa5936887aa44f7afffab3377d3cab43b9dda81 100644 (file)
@@ -18,7 +18,7 @@
 #include "libgeom.h"
 #include "cu_tester.h"
 
-void test_typmod_macros(void)
+static void test_typmod_macros(void)
 {
        uint32 typmod = 0;
        int srid = 4326;
@@ -43,7 +43,7 @@ void test_typmod_macros(void)
 
 }
 
-void test_flags_macros(void)
+static void test_flags_macros(void)
 {
        uchar flags = 0;
 
@@ -74,7 +74,7 @@ void test_flags_macros(void)
        CU_ASSERT_EQUAL(0, FLAGS_GET_M(flags));
 }
 
-void test_serialized_srid(void)
+static void test_serialized_srid(void)
 {
        GSERIALIZED s;
        uint32 srid = 4326;
@@ -95,7 +95,7 @@ void test_serialized_srid(void)
        CU_ASSERT_EQUAL(rv, srid);
 }
 
-void test_gserialized_from_lwgeom_size(void)
+static void test_gserialized_from_lwgeom_size(void)
 {
        LWGEOM *g;
        size_t size = 0;
@@ -137,7 +137,7 @@ void test_gserialized_from_lwgeom_size(void)
 
 }
 
-void test_gbox_serialized_size(void)
+static void test_gbox_serialized_size(void)
 {
        uchar flags = gflags(0, 0, 0);
        CU_ASSERT_EQUAL(gbox_serialized_size(flags),0);
@@ -155,7 +155,7 @@ void test_gbox_serialized_size(void)
 
 
 
-void test_lwgeom_from_gserialized(void)
+static void test_lwgeom_from_gserialized(void)
 {
        LWGEOM *geom;
        GSERIALIZED *g;
@@ -197,7 +197,7 @@ void test_lwgeom_from_gserialized(void)
 
 }
 
-void test_geometry_type_from_string(void)
+static void test_geometry_type_from_string(void)
 {
        int rv;
        int type = 0, z = 0, m = 0;
@@ -242,7 +242,7 @@ void test_geometry_type_from_string(void)
 
 }
 
-void test_lwgeom_count_vertices(void)
+static void test_lwgeom_count_vertices(void)
 {
        LWGEOM *geom;
 
@@ -260,7 +260,7 @@ void test_lwgeom_count_vertices(void)
 
 }
 
-void test_on_gser_lwgeom_count_vertices(void)
+static void test_on_gser_lwgeom_count_vertices(void)
 {
        LWGEOM *lwgeom;
        GSERIALIZED *g_ser1;
@@ -285,7 +285,7 @@ void test_on_gser_lwgeom_count_vertices(void)
 
 }
 
-void test_lwcollection_extract(void)
+static void test_lwcollection_extract(void)
 {
 
        LWGEOM *geom;
@@ -300,7 +300,7 @@ void test_lwcollection_extract(void)
 
 }
 
-void test_lwgeom_free(void)
+static void test_lwgeom_free(void)
 {
        LWGEOM *geom;
 
index 8a913fed103ca522f5d42f9b89a331b5f3cd611b..2d770c524b41c2c26fde089c90224d0f15983d57 100644 (file)
@@ -20,7 +20,7 @@
 #include "measures.h"
 #include "lwtree.h"
 
-void test_mindistance2d_tolerance(void)
+static void test_mindistance2d_tolerance(void)
 {
        LWGEOM_PARSER_RESULT gp1;
        LWGEOM_PARSER_RESULT gp2;
@@ -117,7 +117,7 @@ void test_mindistance2d_tolerance(void)
 
 }
 
-void test_rect_tree_contains_point(void)
+static void test_rect_tree_contains_point(void)
 {
        LWPOLY *poly;
        POINT2D p;
@@ -267,7 +267,7 @@ void test_rect_tree_contains_point(void)
 
 }
 
-void test_rect_tree_intersects_tree(void)
+static void test_rect_tree_intersects_tree(void)
 {
        LWPOLY *poly1, *poly2;
        RECT_NODE *tree1, *tree2;
index fb6cb51242a1eb06e4a298a979306c32f5c0be40..90389d53c341e5df0b948db861715da4791482e0 100644 (file)
@@ -60,7 +60,7 @@ static void test_lwprint_assert_error(char * point_wkt, const char * format)
 /*
 ** Test points around the globe using the default format.  Null and empty string both mean use the default.
 */
-void test_lwprint_default_format(void)
+static void test_lwprint_default_format(void)
 {
        test_lwprint_assert_format("POINT(0 0)",                NULL, "0\xC2\xB0""0'0.000\"N 0\xC2\xB0""0'0.000\"E");
        test_lwprint_assert_format("POINT(45.4545 12.34567)",   ""  , "12\xC2\xB0""20'44.412\"N 45\xC2\xB0""27'16.200\"E");
@@ -85,7 +85,7 @@ void test_lwprint_default_format(void)
 /*
  * Test all possible combinations of the orders of the parameters.
  */
-void test_lwprint_format_orders(void)
+static void test_lwprint_format_orders(void)
 {
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C DD MM SS", "S 12 20 44 W 45 27 16");
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C DD SS MM", "S 12 44 20 W 45 16 27");
@@ -119,7 +119,7 @@ void test_lwprint_format_orders(void)
 /*
  * Test with and without the optional parameters.
  */
-void test_lwprint_optional_format(void)
+static void test_lwprint_optional_format(void)
 {
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD", "-12.346 -45.455");
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD C", "12.346 S 45.455 W");
@@ -129,7 +129,7 @@ void test_lwprint_optional_format(void)
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD MM.MMM SS.SSS C", "12.000 20.000 44.412 S 45.000 27.000 16.200 W");
 }
 
-void test_lwprint_oddball_formats(void)
+static void test_lwprint_oddball_formats(void)
 {
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDDMM.MMMSS.SSSC", "12.00020.00044.412S 45.00027.00016.200W");
        test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DDMM.MMM", "-1220.740 -4527.270");
@@ -140,7 +140,7 @@ void test_lwprint_oddball_formats(void)
 /*
  * Test using formats that should produce errors.
  */
-void test_lwprint_bad_formats(void)
+static void test_lwprint_bad_formats(void)
 {
        test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD.DDD SS.SSS");
        test_lwprint_assert_error("POINT(1.23456 7.89012)", "MM.MMM SS.SSS");