bug-gnunet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-GNUnet] [bug-gnunet] Spanish translation


From: Christian Grothoff
Subject: Re: [bug-GNUnet] [bug-gnunet] Spanish translation
Date: Sat, 26 Jan 2013 21:42:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 01/26/2013 01:58 PM, Miguel Ángel wrote:
> Hi Christian.
> 
> I did not join to bug-GNUnet (now I am) so I did not receive the last
> reply message, but I have read it in the archive. Also I haven't
> received the TP confirmation yet, as soon as I get it, I will notify
> here.

Great.

> The string "`%' must be followed by HEX number" can be found at:
> ./gnunet/src/fs/fs_uri.c:220:        *emsg = GNUNET_strdup (_("`%' must
> be followed by HEX number"));
> 

Ok, should be fixed in SVN 25923.

> I have taking a look over the code and it is returned by the local
> function percent_decode_keyword, that it is only used in the local
> function uri_ksk_parse that is used at the function GNUNET_FS_uri_parse.
> Every use of this return value is to a %s in a format string and (like
> probably any other error message) it is not used as the format. There
> may be a memory leak that I could look carefully at fs-api.c
>   if (NULL != uris)
>   {
>     uc->ksk_uri = GNUNET_FS_uri_parse (uris, &emsg);
>     GNUNET_free (uris);
>     if (NULL == uc->ksk_uri)
>     {
>       GNUNET_break (0);
>       goto cleanup;
>     }
>   }
> Because emsg is also used in the cleanup here
> cleanup:
>   GNUNET_free_non_null (uc->filename);
>   if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)))
> 
> Maybe I am loosing time because that function already frees the memory
> or It is not actually being called, you may know better than me. I saw
> it looking for the emsg printing, but I also could test it.

No, you're right, there is indeed a (minor) leak there.  Fixed in SVN 25924.


> Resuming, that string is not a c-format string. But when gnunet.pot is
> generated by make it contains:
> #: src/fs/fs_uri.c:220
> #, c-format
> msgid "`%' must be followed by HEX number"
> msgstr ""
> 
> That gives always an error when you execute msgfmt except when copying
> the same string. It seems that gettext sees %' format as valid and
> searches it into the msgstr. Here
> (http://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html) 
> you can find information about that, the solution is to place around a 
> comment with xgettext:no-c-format.
> 
> Happy hacking! :)

Happy hacking indeed ;-).

-Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]