int vs ptr sizes differ on some platforms, make alNum intptr_t to fix
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 12 Jul 2007 10:23:33 +0000 (13:23 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 12 Jul 2007 10:23:33 +0000 (13:23 +0300)
lib/rpmal.c
lib/rpmlib.h

index c762c49..e988439 100644 (file)
@@ -307,7 +307,7 @@ void rpmalDel(rpmal al, alKey pkgKey)
 
 /*@-modfilesys@*/
 if (_rpmal_debug)
-fprintf(stderr, "*** del %p[%d]\n", al->list, pkgNum);
+fprintf(stderr, "*** del %p[%d]\n", al->list, (int) pkgNum);
 /*@=modfilesys@*/
 
     /* Delete directory/file info entries from added package list. */
@@ -449,7 +449,7 @@ alKey rpmalAdd(rpmal * alistp, alKey pkgKey, fnpyKey key,
 
 /*@-modfilesys@*/
 if (_rpmal_debug)
-fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, pkgNum, tscolor);
+fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
 /*@=modfilesys@*/
 
     alp->provides = rpmdsLink(provides, "Provides (rpmalAdd)");
@@ -667,7 +667,7 @@ void rpmalMakeIndex(rpmal al)
 {
     availableIndex ai;
     availablePackage alp;
-    int i;
+    intptr_t i;
 
     if (al == NULL || al->list == NULL) return;
     ai = &al->index;
index 6a4bfe8..8d17376 100644 (file)
@@ -84,7 +84,7 @@ typedef /*@abstract@*/ void * alKey;
  * An added/available package retrieval index.
  */
 /*@-mutrep@*/
-typedef /*@abstract@*/ int alNum;
+typedef /*@abstract@*/ intptr_t alNum;
 /*@=mutrep@*/
 
 /** \ingroup rpmtrans