After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 544031 - db-summary used integer format in printf
db-summary used integer format in printf
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
2.24.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks: 543389
 
 
Reported: 2008-07-21 16:54 UTC by Milan Crha
Modified: 2013-09-14 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (4.68 KB, patch)
2008-07-21 17:23 UTC, Milan Crha
committed Details | Review
proposed eex patch (3.56 KB, patch)
2008-07-21 18:15 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2008-07-21 16:54:38 UTC
On my 64bit machine when compiling evolution-data-server I can see warnings like:
camel-folder-summary.c:3236: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’

These are quite serious and can (in particular cases) cause troubles, as far as I can tell.
Comment 1 Milan Crha 2008-07-21 17:23:17 UTC
Created attachment 114932 [details] [review]
proposed eds patch

for evolution-data-server;

Fixed warnings:
camel-folder-summary.c: In function 'camel_folder_summary_migrate_infos':
camel-folder-summary.c:1049: warning: return makes integer from pointer without a cast
camel-folder-summary.c: In function 'content_info_to_db':
camel-folder-summary.c:3201: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3205: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3212: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3216: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3232: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-folder-summary.c:3236: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
camel-vee-folder.c: In function 'vee_folder_remove_folder':
camel-vee-folder.c:884: warning: suggest parentheses around assignment used as truth value
camel-mbox-summary.c: In function 'summary_header_to_db':
camel-mbox-summary.c:306: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

I kept those others for now. Also, the %d is fixed just by the re-type the argument, because it's size_t, not gsize or similar type.
Comment 2 Milan Crha 2008-07-21 18:15:16 UTC
Created attachment 114938 [details] [review]
proposed eex patch

for evolution-exchange;

I noticed there these warnings, all fixed. One is more-or less serious, guess which. :)

camel-exchange-summary.c: In function 'message_info_to_db':
camel-exchange-summary.c:313: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
camel-exchange-summary.c:313: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
e-cal-backend-exchange.c: In function 'build_msg':
e-cal-backend-exchange.c:1833: warning: unused variable 'mime_type'
e-cal-backend-exchange-calendar.c: In function 'send_objects':
e-cal-backend-exchange-calendar.c:2012: warning: unused variable 'tzcomp'
exchange-component.c: In function ‘new_connection’:
exchange-component.c:331: warning: assignment from incompatible pointer type
exchange-component.c:345: warning: assignment from incompatible pointer type
Comment 3 Srinivasa Ragavan 2008-07-24 14:00:19 UTC
Commit it Milan.
Comment 4 Milan Crha 2008-07-25 06:53:32 UTC
eds part committed to trunk. Committed revision 9191.
eex part committed to trunk. Committed revision 1703.