diff --git a/src/libFLAC/metadata_object.c b/src/libFLAC/metadata_object.c index 290036ce..cbfc29cf 100644 --- a/src/libFLAC/metadata_object.c +++ b/src/libFLAC/metadata_object.c @@ -1073,16 +1073,16 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_replace_comment(FLAC__St field_name_length = eq-entry.entry; - if((i = vorbiscomment_find_entry_from_(object, 0, entry.entry, field_name_length)) >= 0) { + if((i = vorbiscomment_find_entry_from_(object, 0, (const char *)entry.entry, field_name_length)) >= 0) { unsigned index = (unsigned)i; if(!FLAC__metadata_object_vorbiscomment_set_comment(object, index, entry, copy)) return false; if(all && (index+1 < object->data.vorbis_comment.num_comments)) { - for(i = vorbiscomment_find_entry_from_(object, index+1, entry.entry, field_name_length); i >= 0; ) { + for(i = vorbiscomment_find_entry_from_(object, index+1, (const char *)entry.entry, field_name_length); i >= 0; ) { if(!FLAC__metadata_object_vorbiscomment_delete_comment(object, (unsigned)i)) return false; if((unsigned)i < object->data.vorbis_comment.num_comments) - i = vorbiscomment_find_entry_from_(object, (unsigned)i, entry.entry, field_name_length); + i = vorbiscomment_find_entry_from_(object, (unsigned)i, (const char *)entry.entry, field_name_length); else i = -1; } @@ -1124,7 +1124,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_from_name_value_pa if(!FLAC__format_vorbiscomment_entry_name_is_legal(field_name)) return false; - if(!FLAC__format_vorbiscomment_entry_value_is_legal(field_value, (unsigned)(-1))) + if(!FLAC__format_vorbiscomment_entry_value_is_legal((const FLAC__byte *)field_value, (unsigned)(-1))) return false; { diff --git a/src/libOggFLAC/ogg_mapping.c b/src/libOggFLAC/ogg_mapping.c index ae826518..56d2d50b 100644 --- a/src/libOggFLAC/ogg_mapping.c +++ b/src/libOggFLAC/ogg_mapping.c @@ -35,7 +35,7 @@ const unsigned OggFLAC__MAPPING_PACKET_TYPE_LEN = 8; /* bits */ const FLAC__byte OggFLAC__MAPPING_FIRST_HEADER_PACKET_TYPE = 0x7f; -const FLAC__byte * const OggFLAC__MAPPING_MAGIC = "FLAC"; +const FLAC__byte * const OggFLAC__MAPPING_MAGIC = (const FLAC__byte * const)"FLAC"; const unsigned OggFLAC__MAPPING_VERSION_MAJOR_LEN = 8; /* bits */ const unsigned OggFLAC__MAPPING_VERSION_MINOR_LEN = 8; /* bits */ diff --git a/src/metaflac/utils.c b/src/metaflac/utils.c index e7389a2a..057215fe 100644 --- a/src/metaflac/utils.c +++ b/src/metaflac/utils.c @@ -225,7 +225,7 @@ void write_vc_field(const char *filename, const FLAC__StreamMetadata_VorbisComme */ char *converted; - if(utf8_decode(entry->entry, &converted) >= 0) { + if(utf8_decode((const char *)entry->entry, &converted) >= 0) { (void) local_fwrite(converted, 1, strlen(converted), f); free(converted); } diff --git a/src/plugin_common/charset.c b/src/plugin_common/charset.c index a0f6aeaf..dcf5e80c 100644 --- a/src/plugin_common/charset.c +++ b/src/plugin_common/charset.c @@ -88,7 +88,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char outptr = out; retry: - if (iconv(cd, (char**)&input, &length, &outptr, &outleft) == -1) + if (iconv(cd, (char**)&input, &length, &outptr, &outleft) == (size_t)(-1)) { int used; switch (errno) diff --git a/src/share/grabbag/replaygain.c b/src/share/grabbag/replaygain.c index bb9e2429..f209769c 100644 --- a/src/share/grabbag/replaygain.c +++ b/src/share/grabbag/replaygain.c @@ -41,10 +41,10 @@ #endif #define local_max(a,b) ((a)>(b)?(a):(b)) -static const FLAC__byte *tag_title_gain_ = "REPLAYGAIN_TRACK_GAIN"; -static const FLAC__byte *tag_title_peak_ = "REPLAYGAIN_TRACK_PEAK"; -static const FLAC__byte *tag_album_gain_ = "REPLAYGAIN_ALBUM_GAIN"; -static const FLAC__byte *tag_album_peak_ = "REPLAYGAIN_ALBUM_PEAK"; +static const FLAC__byte * const tag_title_gain_ = (const FLAC__byte * const)"REPLAYGAIN_TRACK_GAIN"; +static const FLAC__byte * const tag_title_peak_ = (const FLAC__byte * const)"REPLAYGAIN_TRACK_PEAK"; +static const FLAC__byte * const tag_album_gain_ = (const FLAC__byte * const)"REPLAYGAIN_ALBUM_GAIN"; +static const FLAC__byte * const tag_album_peak_ = (const FLAC__byte * const)"REPLAYGAIN_ALBUM_PEAK"; static const char *peak_format_ = "%s=%1.8f"; static const char *gain_format_ = "%s=%+2.2f dB";