Just built dbmail_2_2_branch latest on my amd64 box, and received a few
warnings. In a nutshell, we need to be sensitive to the fact that size_t
is 64 bits on a 64 bit platform, but int is always 32 bits [1].

In all cases, these are format strings in debug statements, so nothing
to panic about in current releases. But it would be nice to have a
platform sensitive printf format string keyword...

...ooh, found it, z does this: %zu for size_t and %zd for ssize_t. 

Fixed in SVN.

dbmail-message.c: In function '_set_content_from_stream':
dbmail-message.c:391: warning: format '%d' expects type 'int', but
argument 7 has type 'ssize_t'
dbmail-message.c:391: warning: format '%d' expects type 'int', but
argument 8 has type 'ssize_t'
dbmail-mailbox.c: In function 'append_search':
dbmail-mailbox.c:561: warning: cast from pointer to integer of different
size
dbmail-mailbox.c: In function '_do_search':
dbmail-mailbox.c:1450: warning: cast from pointer to integer of
different size
dbmail-mailbox.c: In function '_merge_search':
dbmail-mailbox.c:1475: warning: cast from pointer to integer of
different size
misc.c: In function 'mailbox_remove_namespace':
misc.c:239: warning: format '%u' expects type 'unsigned int', but
argument 8 has type 'long unsigned int'
sort.c: In function 'sort_deliver_to_mailbox':
sort.c:194: warning: format '%d' expects type 'int', but argument 8 has
type 'size_t'

Aaron

1 - We don't run on any 16 bit platforms, so don't nobody remind me that
int is 16 bits on whatever your favorite ancient / embedded chip is :-P

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to