[dvblast-devel] [Git][videolan/dvblast][master] 2 commits: Fix iconv result type
Christophe Massiot (@cmassiot)
gitlab at videolan.org
Sun Aug 6 16:45:45 UTC 2023
Christophe Massiot pushed to branch master at VideoLAN / dvblast
Commits:
d93c83d0 by Stefan Pöschel at 2021-03-24T12:34:40+01:00
Fix iconv result type
- - - - -
4e18d80c by Christophe Massiot at 2023-08-06T18:45:31+02:00
Merge branch 'basicmaster-fix_iconv_result_type'
- - - - -
3 changed files:
- demux.c
- dvblast.c
- dvblastctl.c
Changes:
=====================================
demux.c
=====================================
@@ -2296,7 +2296,7 @@ char *demux_Iconv(void *_unused, const char *psz_encoding,
/* converted strings can be up to six times larger */
i_out_length = i_length * 6;
p = psz_string = malloc(i_out_length);
- if (iconv(iconv_handle, &p_string, &i_length, &p, &i_out_length) == -1) {
+ if (iconv(iconv_handle, &p_string, &i_length, &p, &i_out_length) == (size_t)-1) {
msg_Warn(NULL, "couldn't convert from %s to %s (%m)", psz_encoding,
psz_native_charset);
free(psz_string);
=====================================
dvblast.c
=====================================
@@ -242,7 +242,7 @@ static uint8_t *config_striconv( const char *psz_string,
size_t i_available = i_output;
char *p_output = malloc( i_output );
char *p = p_output;
- if ( iconv( conf_iconv, &psz_tmp, &i_input, &p, &i_available ) == -1 )
+ if ( iconv( conf_iconv, &psz_tmp, &i_input, &p, &i_available ) == (size_t)-1 )
{
free( p_output );
=====================================
dvblastctl.c
=====================================
@@ -148,7 +148,7 @@ char *psi_iconv(void *_unused, const char *psz_encoding,
/* converted strings can be up to six times larger */
i_out_length = i_length * 6;
p = psz_string = malloc(i_out_length);
- if (iconv(iconv_handle, &p_string, &i_length, &p, &i_out_length) == -1) {
+ if (iconv(iconv_handle, &p_string, &i_length, &p, &i_out_length) == (size_t)-1) {
msg_Warn(NULL, "couldn't convert from %s to %s (%m)", psz_encoding,
psz_native_charset);
free(psz_string);
View it on GitLab: https://code.videolan.org/videolan/dvblast/-/compare/4270dcae7b754b25ad27332bb1c55b6b23b85b0d...4e18d80c2474093925248b01c70c4ead35051e30
--
View it on GitLab: https://code.videolan.org/videolan/dvblast/-/compare/4270dcae7b754b25ad27332bb1c55b6b23b85b0d...4e18d80c2474093925248b01c70c4ead35051e30
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the dvblast-devel
mailing list