]> granicus.if.org Git - postgis/commitdiff
Fix some unintialized vars. Fix becoming wrong prototype call in GML3 cunit tests...
authorOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 22 May 2012 08:49:36 +0000 (08:49 +0000)
committerOlivier Courtin <olivier.courtin@camptocamp.com>
Tue, 22 May 2012 08:49:36 +0000 (08:49 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9775 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_out_gml.c
postgis/geography_inout.c
postgis/lwgeom_export.c

index 00c4ae2ddeef09580642efa8614b643a1ca730ce..d00c560a6580d70d899ef13ddf619f1b3073376b 100644 (file)
@@ -59,7 +59,7 @@ static void do_gml3_test_opts(char * in, char * out, char * srs, int precision,
        char *h;
 
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
-       h = lwgeom_to_gml3(g, srs, precision, opts, "gml:");
+       h = lwgeom_to_gml3(g, srs, precision, opts, "gml:", "");
 
        if (strcmp(h, out))
                fprintf(stderr, "\nIn:   %s\nOut:  %s\nTheo: %s\n", in, h, out);
@@ -78,7 +78,7 @@ static void do_gml3_test(char * in, char * out, char * srs, int precision, int i
        if ( is_geodetic ) opts |= LW_GML_IS_DEGREE;
 
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
-       h = lwgeom_to_gml3(g, srs, precision, opts, "gml:");
+       h = lwgeom_to_gml3(g, srs, precision, opts, "gml:", "");
 
        if (strcmp(h, out))
                fprintf(stderr, "\nIn:   %s\nOut:  %s\nTheo: %s\n", in, h, out);
@@ -98,7 +98,7 @@ static void do_gml3_test_prefix(char * in, char * out, char * srs, int precision
        if ( is_geodetic ) opts |= LW_GML_IS_DEGREE;
 
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
-       h = lwgeom_to_gml3(g, srs, precision, opts, prefix);
+       h = lwgeom_to_gml3(g, srs, precision, opts, prefix, "");
 
        if (strcmp(h, out))
                fprintf(stderr, "\nIn:   %s\nOut:  %s\nTheo: %s\n", in, h, out);
@@ -119,7 +119,7 @@ static void do_gml3_test_nodims(char * in, char * out, char * srs, int precision
        if ( is_dims ) opts |= LW_GML_IS_DIMS;
 
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
-       h = lwgeom_to_gml3(g, srs, precision, opts, prefix);
+       h = lwgeom_to_gml3(g, srs, precision, opts, prefix, "");
 
        if (strcmp(h, out))
                fprintf(stderr, "\nIn:   %s\nOut:  %s\nTheo: %s\n", in, h, out);
@@ -155,7 +155,7 @@ static void do_gml3_unsupported(char * in, char * out)
        int opts = LW_GML_IS_DIMS;
 
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
-       h = lwgeom_to_gml3(g, NULL, 0, opts, "");
+       h = lwgeom_to_gml3(g, NULL, 0, opts, "", "");
 
        if (strcmp(cu_error_msg, out))
                fprintf(stderr, "\nGML 3 - In:   %s\nOut:  %s\nTheo: %s\n",
index af5d4fec7df015adf345a9d39a3d9906fa982051..c0d9ff2a1d960418ef2fbba1cb5ce7682fd8a8a9 100644 (file)
@@ -211,10 +211,11 @@ Datum geography_as_gml(PG_FUNCTION_ARGS)
        int option=0;
        int lwopts = LW_GML_IS_DIMS;
        static const char *default_prefix = "gml:";
-       char *prefix_buf, *id_buf;
        const char *prefix = default_prefix;
-       text *prefix_text, *id_text;
-       const char *id;
+       char *prefix_buf = "";
+       text *prefix_text, *id_text = NULL;
+       const char *id="";
+       char *id_buf;
 
 
        /* Get the version */
index 94089de9e567377cd4d268042959084ea83b6e43..0624030cbc9609734280234965a19932d8ddbd3b 100644 (file)
@@ -174,7 +174,7 @@ Datum LWGEOM_asGML(PG_FUNCTION_ARGS)
        int precision = OUT_MAX_DOUBLE_PRECISION;
        static const char* default_prefix = "gml:"; /* default prefix */
        const char* prefix = default_prefix;
-       const char* gml_id;
+       const char* gml_id = "";
        char *prefix_buf, *gml_id_buf;
        text *prefix_text, *gml_id_text;