]> granicus.if.org Git - postgis/commitdiff
patch from m.spring@gmx.de
authorSandro Santilli <strk@keybit.net>
Thu, 20 Nov 2003 18:01:26 +0000 (18:01 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 20 Nov 2003 18:01:26 +0000 (18:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@380 b70326c6-7e19-0410-871a-916f4a2858ee

loader/pgsql2shp.c

index 76450991129c41a0d14074bf9aa0da3948125694..b684588f0778869f58d40f1bd9c8082a16e9a27f 100644 (file)
@@ -10,6 +10,9 @@
  * 
  **********************************************************************
  * $Log$
+ * Revision 1.28  2003/11/20 18:01:26  strk
+ * patch from m.spring@gmx.de
+ *
  * Revision 1.27  2003/11/20 15:27:20  strk
  * Removed some useless strdups.
  * Removed pgtype 22 (int2vector) from the list of integer DBF field types.
@@ -1132,8 +1135,9 @@ addRecord(PGresult *res, int residx, int row)
                /* Integer attribute */
                if (type_ary[j] == 1)
                {
+                       int temp;
                        val = (char *)PQgetvalue(res, residx, j);
-                       int temp = atoi(val);
+                       temp = atoi(val);
 #if VERBOSE > 1
 fprintf(stdout, "i"); fflush(stdout);
 #endif
@@ -1149,8 +1153,9 @@ fprintf(stdout, "i"); fflush(stdout);
                /* Double attribute */
                if (type_ary[j] == 2)
                {
+                       double temp;
                        val = PQgetvalue(res, residx, j);
-                       double temp = atof(val);
+                       temp = atof(val);
 #if VERBOSE > 1
 fprintf(stdout, "d"); fflush(stdout);
 #endif