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 414191 - Type fixes for EContact ints
Type fixes for EContact ints
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
1.10.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-03-03 11:29 UTC by Loïc Minier
Modified: 2013-09-14 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Type fixes for int fields in e-contact.h (656 bytes, patch)
2007-03-03 11:30 UTC, Loïc Minier
committed Details | Review

Description Loïc Minier 2007-03-03 11:29:13 UTC
Hi,

While building evolution, I've noticed signedness warnings when filling structures such as EContactPhoto with g_set_file_contents().  For example:
/home/lool/jhbuild-gnome-2.18/checkout/evolution/plugins/bbdb/gaimbuddies.c:253: warning: pointer targets in passing argument 3 of 'g_file_get_contents' differ in signedness

I believe the type to use for lengths of data fields should be gsize, not int, and the type to use for things like years, months etc. should be unsigned int, not int (well, unless you plan to add support for people born in year 42 BD :-)

I'll attach a patch which achieves the proposed changes.

Bye,
Comment 1 Loïc Minier 2007-03-03 11:30:02 UTC
Created attachment 83803 [details] [review]
Type fixes for int fields in e-contact.h
Comment 2 Loïc Minier 2007-03-03 12:21:51 UTC
Oups, that's e-d-s stuff; sorry.
Comment 3 Srinivasa Ragavan 2007-04-19 18:35:58 UTC
It seems reasonable, but do they harm ABI? /me is confused.
Comment 4 Srinivasa Ragavan 2007-05-11 18:43:17 UTC
Hmm it wont.
Comment 5 Loïc Minier 2007-05-11 19:52:02 UTC
Committed as r7737 in trunk:

2007-05-11  Loïc Minier  <lool@dooz.org>

        * libebook/e-contact.h:
        Use gsize for length of data fields, not int; use unsigned int insted
        of int for year, month, and day. (#414191)