]> granicus.if.org Git - postgresql/commitdiff
This prevent gcc from complaining about casting a short to a char * and
authorMarc G. Fournier <scrappy@hub.org>
Wed, 31 Jul 1996 18:48:16 +0000 (18:48 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Wed, 31 Jul 1996 18:48:16 +0000 (18:48 +0000)
fixes another complaint.

More fixes from Bruce...

src/backend/access/nbtree/nbtsort.c
src/backend/optimizer/util/clauseinfo.c
src/backend/optimizer/util/plancat.c
src/backend/utils/adt/selfuncs.c

index 3d2676324a03b47bbde50f88eee07ae18fe56d6a..c01c799978cfab08e719105a24c411d729a1f307 100644 (file)
@@ -5,7 +5,7 @@
  *
  *
  * IDENTIFICATION
- *    $Id: nbtsort.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $
+ *    $Id: nbtsort.c,v 1.2 1996/07/31 18:46:47 scrappy Exp $
  *
  * NOTES
  *
@@ -97,10 +97,10 @@ _bt_isortcmpinit(Relation index)
 }
 
 static int
-_bt_isortcmp(BTItem *bti1p, BTItem *bti2p)
+_bt_isortcmp(const void *bti1p,const void *bti2p)
 {
-    BTItem bti1 = *bti1p;
-    BTItem bti2 = *bti2p;
+    BTItem bti1 = *(BTItem *)bti1p;
+    BTItem bti2 = *(BTItem *)bti2p;
 
     if (bti1 == (BTItem) NULL) {
        if (bti2 == (BTItem) NULL) {
index 81a64d63368990b72de3d4dcf4477750ad2cbaa7..2d648eb3605e296c0a485599fa7c02ae482666b5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.2 1996/07/22 23:30:57 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.3 1996/07/31 18:47:06 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -103,7 +103,7 @@ get_relattvals(List *clauseinfo_list,
 
        temp = (CInfo *)lfirst(i);
        get_relattval((Node*)temp->clause, &dummy, &attno, &constval, &flag);
-       result1 = lappendi(result1, attno);
+       result1 = lappendi(result1, (int)attno);
        result2 = lappendi(result2, constval);
        result3 = lappendi(result3, flag);
     }
index 4dca017f95a33213246fab341d4f58a5ce4bfb2e..2f44c45c7f4eba6f8b6f5948402dd477397cd932 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.1.1.1 1996/07/09 06:21:39 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.2 1996/07/31 18:47:08 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -324,7 +324,7 @@ restriction_selectivity(Oid functionObjectId,
     result = (float64) fmgr(functionObjectId,
                            (char *) operatorObjectId,
                            (char *) relationObjectId, 
-                           (char *) attributeNumber,
+                           (char *) (int)attributeNumber,
                            (char *) constValue,
                            (char *) constFlag,
                            NULL);
@@ -363,9 +363,9 @@ join_selectivity (Oid functionObjectId,
     result = (float64) fmgr(functionObjectId,
                            (char *) operatorObjectId,
                            (char *) relationObjectId1,
-                           (char *) attributeNumber1,
+                           (char *) (int)attributeNumber1,
                            (char *) relationObjectId2,
-                           (char *) attributeNumber2,
+                           (char *) (int)attributeNumber2,
                            NULL);
     if (!PointerIsValid(result))
        elog(WARN, "JoinClauseSelectivity: bad pointer");
index 8ee93b768d38a8d2e1e93dc9578f1555ae4aea53..d1d5daae9f302268fce52f4f7eb9032194a0f559 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.2 1996/07/31 18:48:16 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -380,7 +380,7 @@ btreesel(Oid operatorObjectId,
        result = (float64)fmgr(get_oprrest (operatorObjectId),
                               (char*)operatorObjectId,
                               (char*)indrelid,
-                              (char*)attributeNumber,
+                              (char*)(int)attributeNumber,
                               (char*)constValue,
                               (char*)constFlag,
                               NULL);
@@ -422,7 +422,7 @@ btreenpage(Oid operatorObjectId,
        temp = (float64)fmgr(get_oprrest (operatorObjectId),
                             (char*)operatorObjectId,
                             (char*)indrelid,
-                            (char*)attributeNumber,
+                            (char*)(int)attributeNumber,
                             (char*)constValue,
                             (char*)constFlag,
                             NULL);
@@ -484,7 +484,7 @@ hashsel(Oid operatorObjectId,
        result = (float64)fmgr(get_oprrest (operatorObjectId),
                               (char*)operatorObjectId,
                               (char*)indrelid,
-                              (char*)attributeNumber,
+                              (char*)(int)attributeNumber,
                               (char*)constValue,
                               (char*)constFlag,
                               NULL);
@@ -545,7 +545,7 @@ hashnpage(Oid operatorObjectId,
        temp = (float64)fmgr(get_oprrest (operatorObjectId),
                             (char*)operatorObjectId,
                             (char*)indrelid,
-                            (char*)attributeNumber,
+                            (char*)(int)attributeNumber,
                             (char*)constValue,
                             (char*)constFlag,
                             NULL);