fixes to remove warnings from gcc-4.0.0
This commit is contained in:
parent
d263e6eec0
commit
b4de1692f3
@ -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;
|
||||
|
||||
{
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user