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 631109 - Fix some compiler warnings
Fix some compiler warnings
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: general
4.2.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-01 15:40 UTC by David King
Modified: 2010-12-23 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add G_GNUC_UNUSED to unused function parameters (566.35 KB, patch)
2010-10-01 15:40 UTC, David King
none Details | Review
fix missing field initializer warnings (mostly) (118.51 KB, patch)
2010-10-01 15:43 UTC, David King
none Details | Review
fix some signedness warnings (55.79 KB, patch)
2010-10-01 15:44 UTC, David King
none Details | Review
miscellaneous fixes (6.92 KB, patch)
2010-10-01 15:45 UTC, David King
none Details | Review

Description David King 2010-10-01 15:40:55 UTC
Created attachment 171508 [details] [review]
add G_GNUC_UNUSED to unused function parameters

Compiling libgda with -Wall and -Wextra passed to GCC produces lots of compiler warnings. Attaching four patches, split to make review easier, to reduce the number of warnings significantly. To replicate the compiler warnings setup, run make as below:

make CFLAGS="-Wall -Wextra"

It might be good to add a macro to configure.ac so that different warning levels can be selected (for developers and tarball users for example), like in regexxer and other packages:

http://git.gnome.org/browse/regexxer/tree/configure.ac#n55

but for this to be useful the remaining warnings have to be fixed, as well as the warnings from generated code (or the warnings need to be disabled in that specific case).
Comment 1 David King 2010-10-01 15:43:42 UTC
Created attachment 171509 [details] [review]
fix missing field initializer warnings (mostly)
Comment 2 David King 2010-10-01 15:44:40 UTC
Created attachment 171510 [details] [review]
fix some signedness warnings
Comment 3 David King 2010-10-01 15:45:20 UTC
Created attachment 171511 [details] [review]
miscellaneous fixes
Comment 4 Murray Cumming 2010-10-01 15:58:18 UTC
Is any of this in the copy of sqlite? If so, those fixes should go to upstream sqlite.
Comment 5 malerba 2010-10-02 12:14:14 UTC
All patches applied to git/master. As I'm currently reworking/cleaning the configure.ac files, I'll introduce a debug option so that different warning levels can be selected.
Thanks a lot!
Comment 6 Murray Cumming 2010-12-02 08:19:33 UTC
(In reply to comment #5)
> All patches applied to git/master. As I'm currently reworking/cleaning the
> configure.ac files,

How is that going? Is it done already?

> I'll introduce a debug option so that different warning
> levels can be selected.

Did this happen? Can David do it for you?
Comment 7 malerba 2010-12-02 19:32:47 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > All patches applied to git/master. As I'm currently reworking/cleaning the
> > configure.ac files,
> 
> How is that going? Is it done already?

This is now done: all of the external and optional libraries are detected using code in separate M4 files.

> 
> > I'll introduce a debug option so that different warning
> > levels can be selected.
> 
> Did this happen? Can David do it for you?

I have not done it, and I would apreciate if David could do it, thanks!
Comment 8 Murray Cumming 2010-12-22 22:35:48 UTC
(In reply to comment #7)
> I have not done it, and I would apreciate if David could do it, thanks!

See bug #342220, which could use your approval.
Comment 9 malerba 2010-12-23 13:57:13 UTC
Patch in bug #342220 applied!