summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flac/main.c2
-rw-r--r--src/libFLAC/metadata_object.c6
-rw-r--r--src/libOggFLAC/ogg_helper.c4
-rw-r--r--src/plugin_common/charset.c2
-rw-r--r--src/plugin_common/tags.c2
-rw-r--r--src/plugin_winamp2/infobox.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/flac/main.c b/src/flac/main.c
index 1ddea280..86cf715e 100644
--- a/src/flac/main.c
+++ b/src/flac/main.c
@@ -631,7 +631,7 @@ int parse_options(int argc, char *argv[])
if(option_values.num_files > 0) {
unsigned i = 0;
- if(0 == (option_values.filenames = malloc(sizeof(char *) * option_values.num_files)))
+ if(0 == (option_values.filenames = (char**)malloc(sizeof(char*) * option_values.num_files)))
die("out of memory allocating space for file names list");
while(share__optind < argc)
option_values.filenames[i++] = local_strdup(argv[share__optind++]);
diff --git a/src/libFLAC/metadata_object.c b/src/libFLAC/metadata_object.c
index 8907bdd8..d1c0792e 100644
--- a/src/libFLAC/metadata_object.c
+++ b/src/libFLAC/metadata_object.c
@@ -1131,7 +1131,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_from_name_value_pa
const size_t nn = strlen(field_name);
const size_t nv = strlen(field_value);
entry->length = nn + 1 /*=*/ + nv;
- if(0 == (entry->entry = malloc(entry->length+1)))
+ if(0 == (entry->entry = (FLAC__byte*)malloc(entry->length+1)))
return false;
memcpy(entry->entry, field_name, nn);
entry->entry[nn] = '=';
@@ -1158,9 +1158,9 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_to_name_value_pair
FLAC__ASSERT(0 != eq);
if(0 == eq)
return false; /* double protection */
- if(0 == (*field_name = malloc(nn+1)))
+ if(0 == (*field_name = (char*)malloc(nn+1)))
return false;
- if(0 == (*field_value = malloc(nv+1))) {
+ if(0 == (*field_value = (char*)malloc(nv+1))) {
free(*field_name);
return false;
}
diff --git a/src/libOggFLAC/ogg_helper.c b/src/libOggFLAC/ogg_helper.c
index 5ee534de..169ee3aa 100644
--- a/src/libOggFLAC/ogg_helper.c
+++ b/src/libOggFLAC/ogg_helper.c
@@ -102,7 +102,7 @@ FLAC__bool simple_ogg_page__get_at(OggFLAC__SeekableStreamEncoder *encoder, FLAC
}
/* allocate space for the page header */
- if(0 == (page->header = malloc(OGG_MAX_HEADER_LEN))) {
+ if(0 == (page->header = (unsigned char *)malloc(OGG_MAX_HEADER_LEN))) {
encoder->protected_->state = OggFLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR;
return false;
}
@@ -144,7 +144,7 @@ FLAC__bool simple_ogg_page__get_at(OggFLAC__SeekableStreamEncoder *encoder, FLAC
}
/* allocate space for the page body */
- if(0 == (page->body = malloc(page->body_len))) {
+ if(0 == (page->body = (unsigned char *)malloc(page->body_len))) {
encoder->protected_->state = OggFLAC__SEEKABLE_STREAM_ENCODER_MEMORY_ALLOCATION_ERROR;
return false;
}
diff --git a/src/plugin_common/charset.c b/src/plugin_common/charset.c
index d5c159e7..ce3e8b88 100644
--- a/src/plugin_common/charset.c
+++ b/src/plugin_common/charset.c
@@ -83,7 +83,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char
/* Due to a GLIBC bug, round outbuf_size up to a multiple of 4 */
/* + 1 for nul in case len == 1 */
outsize = ((length + 3) & ~3) + 1;
- out = malloc(outsize);
+ out = (char*)malloc(outsize);
outleft = outsize - 1;
outptr = out;
diff --git a/src/plugin_common/tags.c b/src/plugin_common/tags.c
index 1de2a8a0..c69d1b06 100644
--- a/src/plugin_common/tags.c
+++ b/src/plugin_common/tags.c
@@ -265,7 +265,7 @@ FLAC__bool FLAC_plugin__tags_add_tag_utf8(FLAC__StreamMetadata *tags, const char
const size_t value_len = strlen(value);
const size_t separator_len = strlen(separator);
FLAC__byte *new_entry;
- if(0 == (new_entry = realloc(entry->entry, entry->length + value_len + separator_len + 1)))
+ if(0 == (new_entry = (FLAC__byte*)realloc(entry->entry, entry->length + value_len + separator_len + 1)))
return false;
memcpy(new_entry+entry->length, separator, separator_len);
entry->length += separator_len;
diff --git a/src/plugin_winamp2/infobox.c b/src/plugin_winamp2/infobox.c
index 88900892..dddcff5e 100644
--- a/src/plugin_winamp2/infobox.c
+++ b/src/plugin_winamp2/infobox.c
@@ -183,7 +183,7 @@ static wchar_t *AnsiToWide(const char *src)
len = strlen(src) + 1;
/* copy */
- dest = malloc(len*sizeof(wchar_t));
+ dest = (wchar_t*)malloc(len*sizeof(wchar_t));
if (dest) mbstowcs(dest, src, len);
return dest;
}