GPGME Large File Support on HPUX (seek)

Christian Biere christianbiere at gmx.de
Wed Jun 27 00:59:38 CEST 2007


Aaron Bush wrote:
>         gpgme_data_t  in;
>         off_t   len;
>         gpgme_error_t err;
> 
>         err = gpgme_data_new_from_mem(&in, "Hallo Leute\n", 12, 0);
>         printf("new_mem:%d %s->%d\n", __LINE__, gpgme_strerror(err),
> err);
> 
>         len = gpgme_data_seek(in, 0, SEEK_SET);
>         printf("Offset SEEK_SET = %d\n", len);

You mustn't pass an off_t to printf() using %d as format specifier unless
off_t is by incident the same as an int (as typically on old 32-bit systems).
Always use -W -Wall -Wformat=2 for GCC. I'm almost sure it would scream
bloody murder in at least one of both cases.

-- 
Christian



More information about the Gnupg-devel mailing list