GNOME Bugzilla – Bug 473903
Remove serious compiler warnings in evo
Last modified: 2013-09-13 00:58:18 UTC
I found some bugs where the code didn't work and it helped to fix compiler warnings there, so the compiler knows about them, but it has been overlooked. I will attach here a patch for such changes.
Created attachment 94998 [details] [review] proposed evo patch for evolution; notice I compile on 64bit system and that there are other notes below. e-print.c: In function 'load_page_setup': e-print.c:116: warning: control reaches end of non-void function gal-a11y-e-cell-tree.c: In function 'gal_a11y_e_cell_tree_new': gal-a11y-e-cell-tree.c:234: warning: assignment from incompatible pointer type e-tree.c: In function 'et_real_construct': e-tree.c:1466: warning: return makes integer from pointer without a cast eab-contact-merging.c: In function 'response': eab-contact-merging.c:414: warning: 'value' is used uninitialized in this function cal-search-bar.c: In function 'get_current_category': cal-search-bar.c:256: warning: 'i' may be used uninitialized in this function e-meeting-store.c: In function 'freebusy_async': e-meeting-store.c:1198: warning: passing argument 1 of 'g_free' discards qualifiers from pointer target type e-tasks.c: In function 'e_tasks_open_task_id': e-tasks.c:1460: warning: cast from pointer to integer of different size itip-utils.c: In function 'comp_minimal': itip-utils.c:893: warning: 'attendee_sentby_text' may be used uninitialized in this function print.c: In function 'print_calendar_draw_page': print.c:2205: warning: passing argument 1 of 'gnome_calendar_get_view' from incompatible pointer type print.c:2207: warning: passing argument 2 of 'print_day_view' from incompatible pointer type print.c:2211: warning: passing argument 2 of 'print_week_view' from incompatible pointer type print.c:2214: warning: passing argument 2 of 'print_month_view' from incompatible pointer type print.c: In function 'print_calendar': print.c:2231: warning: assignment from incompatible pointer type print.c: In function 'print_comp_draw_page': print.c:2276: warning: assignment from incompatible pointer type print.c:2277: warning: assignment from incompatible pointer type print.c: In function 'print_comp': print.c:2466: warning: assignment from incompatible pointer type print.c:2467: warning: assignment from incompatible pointer type e-msg-composer.c: In function 'handle_multipart_encrypted': e-msg-composer.c:4348: warning: passing argument 2 of 'handle_multipart_encrypted' from incompatible pointer type em-composer-utils.c: In function 'composer_get_message': em-composer-utils.c:369: warning: assignment from incompatible pointer type em-composer-utils.c:370: warning: passing argument 1 of 'g_object_set_data' from incompatible pointer type em-composer-utils.c:374: warning: passing argument 1 of 'g_object_get_data' from incompatible pointer type em-folder-tree.c: In function 'get_last_child': em-folder-tree.c:2396: warning: control reaches end of non-void function NOTE: that get_last_child should leak, am I right? em-folder-tree.c: In function 'em_folder_tree_select_prev_path': em-folder-tree.c:2404: warning: 'path' may be used uninitialized in this function em-folder-utils.c: In function 'emfu_popup_new_folder_response': em-folder-utils.c:728: warning: assignment discards qualifiers from pointer target type em-format.c: In function 'em_format_add_puri': em-format.c:337: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' em-mailer-prefs.c: In function 'junk_plugin_changed': em-mailer-prefs.c:784: warning: cast from pointer to integer of different size em-mailer-prefs.c: In function 'junk_plugin_setup': em-mailer-prefs.c:836: warning: cast from pointer to integer of different size NOTE: this should be a cause of troubles in that junk blocker, we should make sure every plugin returns void * from invoke, otherwise it can break something, probably exchange-delegates.c: In function 'email_look_up': exchange-delegates.c:531: warning: 'return' with no value, in function returning non-void exchange-mail-send-options.c: In function 'append_to_header': exchange-mail-send-options.c:88: warning: assignment from incompatible pointer type exchange-mail-send-options.c:89: warning: passing argument 1 of 'camel_address_encode' from incompatible pointer type mail-to-task.c: In function 'set_attachments': mail-to-task.c:215: warning: assignment discards qualifiers from pointer target type ------------------------------------------------------------------------------- This is very weired, it is either a typo in definition of data member (it's now gpointer * and should probably be gpointer, or it should be wrote &data there, but it doesn't make sense to me). Those warnings under them are a bit strange too. mail-send-recv.c: In function 'build_dialog': mail-send-recv.c:541: warning: passing argument 3 of 'em_event_target_new_send_receive' from incompatible pointer type mail-send-recv.c:542: warning: passing argument 1 of 'e_event_emit' from incompatible pointer type mail-send-recv.c:542: warning: passing argument 3 of 'e_event_emit' from incompatible pointer type
Looks fine for me. I need another reviewer to approve this too.
Looks fine to me too. Lots of nice catches here, especially the junk plugins.
Committed to trunk. Committed revision 34192. Here left only a mail-send-recv.c issue.
For the mail-send-recv.c warnings, EMEvent is a subclass of EEvent, so it looks like we just need some casts there.
I don't think so (completely). The most strange thing there is that we pass there '&data', it should be definitely 'data' (not pointer to pointer). Maybe other things can be fixed in a way you suggested. I only know that this doesn't hurt because it's not used anywhere, *yet* :) (I think no plugin is connected into this hooker, as far as I know).
Created attachment 96463 [details] [review] proposed evo patch for evolution; Here's patch for the rest, as Matthew suggested.
Please commit Milan.
Committed to trunk. Committed revision 34346.