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 473903 - Remove serious compiler warnings in evo
Remove serious compiler warnings in evo
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Milan Crha
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-09-05 13:13 UTC by Milan Crha
Modified: 2013-09-13 00:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed evo patch (19.22 KB, patch)
2007-09-05 15:16 UTC, Milan Crha
committed Details | Review
proposed evo patch (3.52 KB, patch)
2007-10-01 14:20 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2007-09-05 13:13:38 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.
Comment 1 Milan Crha 2007-09-05 15:16:44 UTC
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
Comment 2 Srinivasa Ragavan 2007-09-06 11:13:24 UTC
Looks fine for me. I need another reviewer to approve this too.
Comment 3 Matthew Barnes 2007-09-06 19:05:36 UTC
Looks fine to me too.  Lots of nice catches here, especially the junk plugins.
Comment 4 Milan Crha 2007-09-07 07:54:52 UTC
Committed to trunk. Committed revision 34192.

Here left only a mail-send-recv.c issue.
Comment 5 Matthew Barnes 2007-09-07 13:03:24 UTC
For the mail-send-recv.c warnings, EMEvent is a subclass of EEvent, so it looks like we just need some casts there.
Comment 6 Milan Crha 2007-09-07 13:09:05 UTC
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).
Comment 7 Milan Crha 2007-10-01 14:20:28 UTC
Created attachment 96463 [details] [review]
proposed evo patch

for evolution;

Here's patch for the rest, as Matthew suggested.
Comment 8 Srinivasa Ragavan 2007-10-03 04:57:10 UTC
Please commit Milan.
Comment 9 Milan Crha 2007-10-03 08:41:17 UTC
Committed to trunk. Committed revision 34346.