[elinks-dev] [PATCH] charsets.c: fix gcc warning

Laurent MONIN zas at norz.org
Mon Mar 5 13:52:17 MST 2007


On Tue, 27 Feb 2007 13:32:59 +0300
Alexey Tourbin <at at altlinux.ru> wrote:

> Hello,
> 
> I've got a few patches for elinks-0.11 which make it -Wall -Werror
> clean against recent gcc-4.1 compiler.  Some of them can be applied
> to elinks-0.12, too.
> 
> charsets.c: In function 'get_translation_table_to_utf_8':
> charsets.c:274: warning: value computed is not used
> charsets.c:274: warning: value computed is not used
> ---
>  src/intl/charsets.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intl/charsets.c b/src/intl/charsets.c
> index d25c558..309da05 100644
> --- a/src/intl/charsets.c
> +++ b/src/intl/charsets.c
> @@ -269,9 +269,10 @@ get_translation_table_to_utf_8(int from)
>  	if (from == -1) return NULL;
>  	from &= ~SYSTEM_CHARSET_FLAG;
>  	if (from == lfr) return utf_table;
> -	if (utf_table_init)
> -		memset(utf_table, 0, sizeof(utf_table)),
> +	if (utf_table_init) {
> +		memset(utf_table, 0, sizeof(utf_table));
>  		utf_table_init = 0;
> +	}
>  	else
>  		free_utf_table();
>  
> -- 
> 1.5.0.1.GIT
> 

Thanks, committed to master branch.

Kind regards,

--

Zas


More information about the elinks-dev mailing list