Silence bunch of compiler warnings from test programs
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Nov 2007 09:00:51 +0000 (11:00 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Nov 2007 09:00:51 +0000 (11:00 +0200)
lib/tplatform.c
lib/trb.c
rpmdb/tdbi.c
rpmio/tdir.c
rpmio/tfts.c
rpmio/tget.c
rpmio/tglob.c
rpmio/thkp.c
rpmio/tput.c
tools/rpminject.c
tools/rpmsort.c

index 769bcc9..da55567 100644 (file)
@@ -27,7 +27,7 @@ static int rpmPlatform(void)
        goto exit;
     }
 
-    p = b;
+    p = (char *) b;
     for (pe = p; p && *p; p = pe) {
        pe = strchr(p, '\n');
        if (pe)
index 153a31a..c0c310e 100644 (file)
--- a/lib/trb.c
+++ b/lib/trb.c
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
 
     rpmSetVerbosity(RPMLOG_NOTICE);
 
-    optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     (void) poptReadConfigFile(optCon, LIBRPMALIAS_FILENAME);
 #if RPM_USES_POPTREADDEFAULTCONFIG
     (void) poptReadDefaultConfig(optCon, 1);
index 66ad5a4..c637275 100644 (file)
@@ -58,7 +58,7 @@ main(int argc, char *argv[])
        }
        kval = key.data;
        klen = key.size;
-       printf("%3d %.*s\t%p[%d]\n", nrecs, klen, kval, data.data, data.size);
+       printf("%3d %.*s\t%p[%d]\n", nrecs, (int) klen, kval, data.data, data.size);
 
        memset(&key, 0, sizeof(key));
        memset(&data, 0, sizeof(data));
index 32b1678..ee829d8 100644 (file)
@@ -51,7 +51,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char**) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index a96967e..af1c1f8 100644 (file)
@@ -143,7 +143,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index 432a6f3..b6b2b35 100644 (file)
@@ -21,13 +21,14 @@ static char * dirpath = DIRPATH;
 static void readFile(const char * path)
 {
     FD_t fd;
+    int xx;
 
 fprintf(stderr, "===== %s\n", path);
     fd = Fopen(path, "r.ufdio");
     if (fd != NULL) {
        char buf[BUFSIZ];
        size_t len = Fread(buf, 1, sizeof(buf), fd);
-       int xx = Fclose(fd);
+       xx = Fclose(fd);
 
        if (len > 0)
            fwrite(buf, 1, len, stderr);
@@ -48,7 +49,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index 593e733..fe461e8 100644 (file)
@@ -62,7 +62,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index 081ad2c..ea9d689 100644 (file)
@@ -101,7 +101,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index 7942054..bb3ba9b 100644 (file)
@@ -108,7 +108,7 @@ static struct poptOption optionsTable[] = {
 int
 main(int argc, char *argv[])
 {
-    poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
+    poptContext optCon = poptGetContext(argv[0], argc, (const char **) argv, optionsTable, 0);
     int rc;
 
     while ((rc = poptGetNextOpt(optCon)) > 0) {
index 538795e..b7eb7ea 100644 (file)
@@ -231,9 +231,9 @@ Header headerCopyWithConvert(Header h, cmd_t *cmds[], int ncmds)
        }
 
        if (type == RPM_STRING_ARRAY_TYPE || type == RPM_I18NSTRING_TYPE)
-           free(vals);
+           _free(vals);
        if (nvals)
-           free(nvals);
+           _free(nvals);
     }
 
     headerFreeIterator(headerIter);
index aed410e..31b2cd0 100644 (file)
@@ -295,7 +295,7 @@ main(int argc, char *argv[])
 
     _depends_debug = 1;
 
-    optCon = poptGetContext("rpmsort", argc, argv, optionsTable, 0);
+    optCon = poptGetContext("rpmsort", argc, (const char **) argv, optionsTable, 0);
 #if RPM_USES_POPTREADDEFAULTCONFIG
     poptReadDefaultConfig(optCon, 1);
 #endif