[erlang-patches] Re: Two printf format fixes

Martti Kuparinen <>
Tue Mar 2 11:33:21 CET 2010


Björn Gustavsson wrote:

>> -       fprintf(stderr, "esock_malloc: cannot alloc %d bytes\n", size);
>> +       fprintf(stderr, "esock_malloc: cannot alloc %zu bytes\n", size);
> 
> As far as I know, the "z" specifier is not portable. For

Could you then consider type-casting size to (unsigned long long) and use the 
correct format for that?

Martti


More information about the erlang-patches mailing list