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 345022 - [patch] compiler warning fixes
[patch] compiler warning fixes
Status: RESOLVED FIXED
Product: GnomeICU
Classification: Deprecated
Component: General
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: gnomeicu-maint
gnomeicu-maint
Depends on:
Blocks:
 
 
Reported: 2006-06-15 15:30 UTC by Stanislav Brabec
Modified: 2006-06-16 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnomeicu-BNC-159099.patch (445 bytes, patch)
2006-06-15 15:32 UTC, Stanislav Brabec
committed Details | Review
gnomeicu-implicit-declaration.patch (3.63 KB, patch)
2006-06-15 15:41 UTC, Stanislav Brabec
committed Details | Review
gnomeicu-void.patch (1.56 KB, patch)
2006-06-15 15:43 UTC, Stanislav Brabec
committed Details | Review
gnomeicu-random-return.patch (185 bytes, patch)
2006-06-15 15:44 UTC, Stanislav Brabec
committed Details | Review
gnomeicu-uninitialized.patch (515 bytes, patch)
2006-06-15 15:46 UTC, Stanislav Brabec
committed Details | Review
gnomeicu-warnings.log (55.32 KB, text/plain)
2006-06-15 16:07 UTC, Stanislav Brabec
  Details

Description Stanislav Brabec 2006-06-15 15:30:46 UTC
Attached patches tries to fix some serious compilation warnings.

All patches applies to gnomeicu-0.99.10.
Comment 1 Stanislav Brabec 2006-06-15 15:32:39 UTC
Created attachment 67426 [details] [review]
gnomeicu-BNC-159099.patch

v7newuser.c:146: warning: comparisons like X<=Y<=Z do not have their
mathematical meaning
v7recv.c:384: warning: comparisons like X<=Y<=Z do not have their mathematical
meaning

Reference:
https://bugzilla.novell.com/show_bug.cgi?id=159099
Comment 2 Stanislav Brabec 2006-06-15 15:41:21 UTC
Created attachment 67428 [details] [review]
gnomeicu-implicit-declaration.patch

Fixes all implicit declaration warnings. On 64 bit platforms, these warnings can cause random crashes, because compiler has no information about data type width.
Comment 3 Stanislav Brabec 2006-06-15 15:43:01 UTC
Created attachment 67429 [details] [review]
gnomeicu-void.patch

Fixes invalid use id g_return_if_fail() in non-void functions.

Author: Gary Ekker
Comment 4 Stanislav Brabec 2006-06-15 15:44:15 UTC
Created attachment 67430 [details] [review]
gnomeicu-random-return.patch

Fixes (possible) random return value warning.
Comment 5 Stanislav Brabec 2006-06-15 15:46:04 UTC
Created attachment 67431 [details] [review]
gnomeicu-uninitialized.patch

Attempt to fix variable used before set warnings. Please carefully review this patch and think twice before applying. Fix may be incorrect.

Partial reference: https://bugzilla.novell.com/show_bug.cgi?id=184318
Comment 6 Stanislav Brabec 2006-06-15 16:00:10 UTC
And finally, "no" locale is deprecated and files should be renamed to "nb":

rename no nb po/no.*
sed -i "s/\(ALL_LINGUAS.*\) no /\1 nb /" configure.in
Comment 7 Stanislav Brabec 2006-06-15 16:07:38 UTC
Created attachment 67433 [details]
gnomeicu-warnings.log

Remaining warnings after applying all these patches while compiling with gcc 4.1.0.

Note that you can also remove obsolete acinclude.m4 (and call aclocal and/or autoreconf to update aclocal.m4), because AM_PATH_ESD is no more used.
Comment 8 Olivier Crête 2006-06-15 17:27:24 UTC
thanks for the patches, I'll apply them.
Comment 9 Olivier Crête 2006-06-16 02:10:20 UTC
I applied everything except the second patch in attachement 67431 which seems wrong to me.

Thanks for you work.
Comment 10 Stanislav Brabec 2006-06-16 10:15:19 UTC
OK, my fix is bad, but bug is real:

v7recv.c: In function 'v7_advanced_message':
v7recv.c:774: warning: 'here' is used uninitialized in this function
Comment 11 Olivier Crête 2006-06-16 12:42:58 UTC
I believe this one has already been fixed in the CVS head.