From: Dirk Mueller Date: Thu, 28 May 2009 19:41:39 +0000 (+0200) Subject: reduce -pedantic compile warnings X-Git-Tag: BASE-SuSE-Code-12_1-Branch~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70cec40d6aec445b187fd242735cfe47bd21fe34;p=thirdparty%2Flibsolv.git reduce -pedantic compile warnings --- diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c index 53451e1f..3c6643ca 100644 --- a/tools/repo_rpmdb.c +++ b/tools/repo_rpmdb.c @@ -309,7 +309,7 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str) const unsigned char *cp; int state = 0; int c; - char *buf = 0, *bp; + unsigned char *buf = 0, *bp; /* check if it's already utf8, code taken from screen ;-) */ cp = (const unsigned char *)str; @@ -358,7 +358,7 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str) /* not utf8, assume latin1 */ buf = sat_malloc(2 * strlen(str) + 1); cp = (const unsigned char *)str; - str = buf; + str = (char*) buf; bp = buf; while ((c = *cp++) != 0) { diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index eed0ab1c..d1caeea4 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -833,7 +833,8 @@ startElement(void *userData, const char *name, const char **atts) } else { - fprintf( stderr, " tag without 'name' attribute, atts = %p, *atts = %p\n", atts, *atts); + fprintf( stderr, " tag without 'name' attribute, atts = %p, *atts = %p\n", + (void*) atts, *atts); break; } if ( (str = find_attr("size", atts)) )