Commit b4de1692 authored by Josh Coalson's avatar Josh Coalson
Browse files

fixes to remove warnings from gcc-4.0.0

parent d263e6ee
...@@ -1073,16 +1073,16 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_replace_comment(FLAC__St ...@@ -1073,16 +1073,16 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_replace_comment(FLAC__St
field_name_length = eq-entry.entry; 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; unsigned index = (unsigned)i;
if(!FLAC__metadata_object_vorbiscomment_set_comment(object, index, entry, copy)) if(!FLAC__metadata_object_vorbiscomment_set_comment(object, index, entry, copy))
return false; return false;
if(all && (index+1 < object->data.vorbis_comment.num_comments)) { 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)) if(!FLAC__metadata_object_vorbiscomment_delete_comment(object, (unsigned)i))
return false; return false;
if((unsigned)i < object->data.vorbis_comment.num_comments) 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 else
i = -1; i = -1;
} }
...@@ -1124,7 +1124,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_from_name_value_pa ...@@ -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)) if(!FLAC__format_vorbiscomment_entry_name_is_legal(field_name))
return false; 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; return false;
{ {
......
...@@ -35,7 +35,7 @@ const unsigned OggFLAC__MAPPING_PACKET_TYPE_LEN = 8; /* bits */ ...@@ -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 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_MAJOR_LEN = 8; /* bits */
const unsigned OggFLAC__MAPPING_VERSION_MINOR_LEN = 8; /* bits */ const unsigned OggFLAC__MAPPING_VERSION_MINOR_LEN = 8; /* bits */
......
...@@ -225,7 +225,7 @@ void write_vc_field(const char *filename, const FLAC__StreamMetadata_VorbisComme ...@@ -225,7 +225,7 @@ void write_vc_field(const char *filename, const FLAC__StreamMetadata_VorbisComme
*/ */
char *converted; 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); (void) local_fwrite(converted, 1, strlen(converted), f);
free(converted); free(converted);
} }
......
...@@ -88,7 +88,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char ...@@ -88,7 +88,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char
outptr = out; outptr = out;
retry: retry:
if (iconv(cd, (char**)&input, &length, &outptr, &outleft) == -1) if (iconv(cd, (char**)&input, &length, &outptr, &outleft) == (size_t)(-1))
{ {
int used; int used;
switch (errno) switch (errno)
......
...@@ -41,10 +41,10 @@ ...@@ -41,10 +41,10 @@
#endif #endif
#define local_max(a,b) ((a)>(b)?(a):(b)) #define local_max(a,b) ((a)>(b)?(a):(b))
static const FLAC__byte *tag_title_gain_ = "REPLAYGAIN_TRACK_GAIN"; static const FLAC__byte * const tag_title_gain_ = (const FLAC__byte * const)"REPLAYGAIN_TRACK_GAIN";
static const FLAC__byte *tag_title_peak_ = "REPLAYGAIN_TRACK_PEAK"; static const FLAC__byte * const tag_title_peak_ = (const FLAC__byte * const)"REPLAYGAIN_TRACK_PEAK";
static const FLAC__byte *tag_album_gain_ = "REPLAYGAIN_ALBUM_GAIN"; static const FLAC__byte * const tag_album_gain_ = (const FLAC__byte * const)"REPLAYGAIN_ALBUM_GAIN";
static const FLAC__byte *tag_album_peak_ = "REPLAYGAIN_ALBUM_PEAK"; 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 *peak_format_ = "%s=%1.8f";
static const char *gain_format_ = "%s=%+2.2f dB"; static const char *gain_format_ = "%s=%+2.2f dB";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment