Commit 11422688 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Fix: Fixed compiler warnings about signedness of strncpy() arguments

parent 0f886d6d
...@@ -621,7 +621,7 @@ void print_flac_comments (FLAC__StreamMetadata_VorbisComment *f_comments, ...@@ -621,7 +621,7 @@ void print_flac_comments (FLAC__StreamMetadata_VorbisComment *f_comments,
temp = realloc(temp, sizeof(char) * temp_len); temp = realloc(temp, sizeof(char) * temp_len);
} }
strncpy(temp, f_comments->comments[i].entry, strncpy(temp, (const char *)f_comments->comments[i].entry,
f_comments->comments[i].length); f_comments->comments[i].length);
temp[f_comments->comments[i].length] = '\0'; temp[f_comments->comments[i].length] = '\0';
......
...@@ -366,7 +366,7 @@ void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComme ...@@ -366,7 +366,7 @@ void copy_comments (vorbis_comment *v_comments, FLAC__StreamMetadata_VorbisComme
{ {
char *comment = malloc(f_comments->comments[i].length + 1); char *comment = malloc(f_comments->comments[i].length + 1);
memset(comment, '\0', f_comments->comments[i].length + 1); memset(comment, '\0', f_comments->comments[i].length + 1);
strncpy(comment, f_comments->comments[i].entry, f_comments->comments[i].length); strncpy(comment, (const char *)f_comments->comments[i].entry, f_comments->comments[i].length);
vorbis_comment_add(v_comments, comment); vorbis_comment_add(v_comments, comment);
free(comment); free(comment);
} }
......
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