fixes to remove warnings from gcc-4.0.0
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 24 Aug 2005 07:39:25 +0000 (07:39 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 24 Aug 2005 07:39:25 +0000 (07:39 +0000)
src/libFLAC/metadata_object.c
src/libOggFLAC/ogg_mapping.c
src/metaflac/utils.c
src/plugin_common/charset.c
src/share/grabbag/replaygain.c

index 290036c..cbfc29c 100644 (file)
@@ -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;
 
        {
index ae82651..56d2d50 100644 (file)
@@ -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 */
index e7389a2..057215f 100644 (file)
@@ -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);
                        }
index a0f6aea..dcf5e80 100644 (file)
@@ -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)
index bb9e242..f209769 100644 (file)
 #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";