]> granicus.if.org Git - postgresql/commitdiff
Cleanup of compiler warnings.
authorBruce Momjian <bruce@momjian.us>
Mon, 6 Apr 1998 02:38:26 +0000 (02:38 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 6 Apr 1998 02:38:26 +0000 (02:38 +0000)
src/backend/optimizer/geqo/geqo_pool.c
src/backend/regex/regcomp.c
src/backend/storage/page/bufpage.c
src/interfaces/ecpg/preproc/ecpg.c

index bd797045215ae0a56576db990967902dbb6bdaa9..5d13b48b2548266961ad63093ef8ea64519a7433 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_pool.c,v 1.6 1998/03/30 16:46:35 momjian Exp $
+ * $Id: geqo_pool.c,v 1.7 1998/04/06 02:38:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -42,7 +42,7 @@
 #include "optimizer/geqo_recombination.h"
 
 
-static int     compare(void *arg1, void *arg2);
+static int     compare(const void *arg1, const void *arg2);
 
 /*
  * alloc-pool--
@@ -136,7 +136,7 @@ sort_pool(Pool *pool)
  *      don't change them!
  */
 static int
-compare(void *arg1, void *arg2)
+compare(const void *arg1, const void *arg2)
 {
        Chromosome      chromo1 = *(Chromosome *) arg1;
        Chromosome      chromo2 = *(Chromosome *) arg2;
index 6b7c472f1b927420d0fba040337f5f9c2d7042d2..a54e70ad2ed98c59a5f4b63e1093bcceb723f113 100644 (file)
@@ -256,7 +256,7 @@ int                 cflags;
 #ifdef MB
        p->next = wcp;
 #else
-       p->next = pattern; /* convenience; we do not modify it */
+       p->next = (pg_wchar *)pattern; /* convenience; we do not modify it */
 #endif
        p->end = p->next + len;
        p->error = 0;
index 9be7d8c64bfad7488e954657b24b79c4562ed917..ae648c0fc452e15422bf15007244034f202a4f79 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.15 1998/03/30 16:47:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.16 1998/04/06 02:38:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -257,7 +257,7 @@ struct itemIdSortData
 };
 
 static int
-itemidcompare(void *itemidp1, void *itemidp2)
+itemidcompare(const void *itemidp1, const void *itemidp2)
 {
        if (((struct itemIdSortData *) itemidp1)->itemiddata.lp_off ==
                ((struct itemIdSortData *) itemidp2)->itemiddata.lp_off)
index 321406f85bc4b8034ff97ac9ef22b3bbec5f7b14..a97b74e748bf5d6df420d1424e36aa90e00ab96f 100644 (file)
@@ -91,7 +91,7 @@ main(int argc, char *const argv[])
                /* after the options there must not be anything but filenames */
                for (fnr = optind; fnr < argc; fnr++)
                {
-                       char       *output_filename, *ptr2ext;
+                       char    *ptr2ext;
 
                        input_filename = mm_alloc(strlen(argv[fnr]) + 5);
 
@@ -113,7 +113,7 @@ main(int argc, char *const argv[])
 
                        if (out_option == 0)/* calculate the output name */
                        {
-                               output_filename = strdup(input_filename);
+                               char *output_filename = strdup(input_filename);
                                
                                ptr2ext = strrchr(output_filename, '.');
                                /* make extension = .c */
@@ -128,6 +128,7 @@ main(int argc, char *const argv[])
                                        free(input_filename);
                                        continue;
                                }
+                               free(output_filename);
                        }
 
                        yyin = fopen(input_filename, "r");
@@ -149,8 +150,6 @@ main(int argc, char *const argv[])
                                if (out_option == 0)
                                        fclose(yyout);
                        }
-
-                       free(output_filename);
                        free(input_filename);
                }
        }