Re: [PATCH] charsets.c: fix gcc warning

Laurent MONIN <[email protected]>
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
On Tue, 27 Feb 2007 13:32:59 +0300
Alexey Tourbin <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.