]> granicus.if.org Git - postgis/commitdiff
- cleaned up all the compiler warnings
authorChris Hodgson <chodgson@refractions.net>
Thu, 17 Oct 2002 16:45:04 +0000 (16:45 +0000)
committerChris Hodgson <chodgson@refractions.net>
Thu, 17 Oct 2002 16:45:04 +0000 (16:45 +0000)
- for getopt.c, this involved moving the line:
      extern char *getenv(const char *name);
  outside of the two nested #ifdefs that it was inside, as it is always required (the code that calls it isn't inside any #ifdefs) Perhaps this may break compilation in non-linux/gnu environments?

git-svn-id: http://svn.osgeo.org/postgis/trunk@202 b70326c6-7e19-0410-871a-916f4a2858ee

loader/dbfopen.c
loader/getopt.c
loader/shp2pgsql.c
loader/shpopen.c

index 87665724877c98d926cf31fc2258876d490aa2a4..989d6a724429988e1d50170d4aabba6216178ad6 100644 (file)
  ******************************************************************************
  *
  * $Log$
+ * Revision 1.4  2002/10/17 16:45:04  chodgson
+ * - cleaned up all the compiler warnings
+ * - for getopt.c, this involved moving the line:
+ *       extern char *getenv(const char *name);
+ *   outside of the two nested #ifdefs that it was inside, as it is always required (the code that calls it isn't inside any #ifdefs) Perhaps this may break compilation in non-linux/gnu environments?
+ *
  * Revision 1.3  2002/05/04 22:44:04  pramsey
  * Update shapelib references to 1.2.9.
  *
  * Added header.
  */
 
-static char rcsid[] = 
-  "$Id$";
-
 #include "shapefil.h"
 
 #include <math.h>
index d2c1a7898313145a9e8e4bb1984c58ddea574bb1..97afde487cc2f312a825e4f64f488bf04aef5fd0 100644 (file)
@@ -111,14 +111,11 @@ static enum
    whose names are inconsistent.  */
 
 #if __STDC__ || defined(PROTO)
-extern char *getenv(const char *name);
 extern int  strcmp (const char *s1, const char *s2);
 extern int  strncmp(const char *s1, const char *s2, int n);
 
 static int my_strlen(const char *s);
 static char *my_index (const char *str, int chr);
-#else
-extern char *getenv ();
 #endif
 
 static int
@@ -147,6 +144,8 @@ my_index (str, chr)
 
 #endif                         /* GNU C library.  */
 
+extern char *getenv(const char *name);
+
 /* Handle permutation of arguments.  */
 
 /* Describe the part of ARGV that contains non-options that have
index 6e693fe8ac0988a52ab5be4cb24689b4a6fe1db1..ad1b4e2b53f4a592062a6a30cb57dfa7f2c359b5 100644 (file)
@@ -103,7 +103,7 @@ char        *protect_quotes_string(char *str){
 
        char    *result;
        char    *str2;
-       char    *start, *end1, *end2;
+       char    *start, *end1, *end2 = NULL;
        int     num_chars = 0;
 
        str2 =  str;
index 981b56ef2b41f5e2f9cb048e10b43d8d9c12911d..4af4ce0c0a7bb41d795baf317aaa642d1f42895f 100644 (file)
  ******************************************************************************
  *
  * $Log$
+ * Revision 1.4  2002/10/17 16:45:04  chodgson
+ * - cleaned up all the compiler warnings
+ * - for getopt.c, this involved moving the line:
+ *       extern char *getenv(const char *name);
+ *   outside of the two nested #ifdefs that it was inside, as it is always required (the code that calls it isn't inside any #ifdefs) Perhaps this may break compilation in non-linux/gnu environments?
+ *
  * Revision 1.3  2002/05/04 22:44:04  pramsey
  * Update shapelib references to 1.2.9.
  *
  *
  */
 
-static char rcsid[] = 
-  "$Id$";
-
 #include "shapefil.h"
 
 #include <math.h>