>From 45119841d2559e93427dcfbb8d4d2500d295a58f Mon Sep 17 00:00:00 2001 From: Andreas Winkelmann Date: Tue, 24 Jun 2014 12:24:11 +0200 Subject: [PATCH 1/2] Fixed some Compiler Warnings about const qualifiers in src/id3v24_tag.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ie: src/id3v24_tag.c: In function ‘etag_write_tags’: src/id3v24_tag.c:1410:13: warning: passing argument 1 of ‘id3_tag_render’ discards ‘const’ qualifier from pointer target type [enabled by default] v1size = id3_tag_render(v1tag, NULL); ^ In file included from src/id3v24_tag.c:50:0: /usr/include/id3tag.h:276:14: note: expected ‘struct id3_tag *’ but argument is of type ‘const struct id3_tag *’ id3_length_t id3_tag_render(struct id3_tag *, id3_byte_t *); ^ Cast away the const qualifier iwhile calling these id3lib functions --- src/id3v24_tag.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/id3v24_tag.c b/src/id3v24_tag.c index a25167c..1e22127 100644 --- a/src/id3v24_tag.c +++ b/src/id3v24_tag.c @@ -1407,11 +1407,11 @@ etag_write_tags (const gchar *filename, /* Render v1 tag */ if (v1tag) { - v1size = id3_tag_render(v1tag, NULL); + v1size = id3_tag_render((struct id3_tag *)v1tag, NULL); if (v1size == 128) { v1buf = g_try_malloc(v1size); - if (id3_tag_render(v1tag, v1buf) != v1size) + if (id3_tag_render((struct id3_tag *)v1tag, v1buf) != v1size) { /* NOTREACHED */ g_free(v1buf); @@ -1423,11 +1423,11 @@ etag_write_tags (const gchar *filename, /* Render v2 tag */ if (v2tag) { - v2size = id3_tag_render(v2tag, NULL); + v2size = id3_tag_render((struct id3_tag *)v2tag, NULL); if (v2size > 10) { v2buf = g_try_malloc0(v2size); - if ((v2size = id3_tag_render(v2tag, v2buf)) == 0) + if ((v2size = id3_tag_render((struct id3_tag *)v2tag, v2buf)) == 0) { /* NOTREACHED */ g_free(v2buf); -- 1.8.4.5