Merge lp://qastaging/~bregma/ginn/build-with-werror into lp://qastaging/ginn

Proposed by Stephen M. Webb
Status: Needs review
Proposed branch: lp://qastaging/~bregma/ginn/build-with-werror
Merge into: lp://qastaging/ginn
Diff against target: 550 lines (+204/-72)
11 files modified
Makefile.am (+2/-0)
configure.ac (+6/-1)
src/Makefile.am (+2/-2)
src/bamf.c (+7/-9)
src/bamf.h (+27/-0)
src/config.c (+58/-35)
src/config.h (+8/-0)
src/ginn.c (+31/-24)
src/ginn.h (+28/-0)
src/xt.c (+1/-1)
src/xt.h (+34/-0)
To merge this branch: bzr merge lp://qastaging/~bregma/ginn/build-with-werror
Reviewer Review Type Date Requested Status
Chase Douglas (community) Approve
Review via email: mp+73887@code.qastaging.launchpad.net

Description of the change

Changes to make GINN build with -Wall -Wextra -pedantic -Werror.

Lots of changes, in fact.

I think GINN is in need of a rewrite for the next cycle.

To post a comment you must log in.
Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) wrote :

I confirm that the code needs to be refactored.
But Stephen, which things you think they need to be rewritten ?

Revision history for this message
Stephen M. Webb (bregma) wrote :

> I confirm that the code needs to be refactored.
> But Stephen, which things you think they need to be rewritten ?

I think the att and wish structures should be modularized further, the functions for handling them are too distributed across source files.

Some changes are necessary to support device-specific wishes.

I would like to see it rewritten using the GEISv2 API (for efficiency reasons).

Note that, other than the GEISv2 rewrite, most of the changes i would like to see are organizational rather than fundamental. By and large, the program does what it should do in a sensible way, but the way it expressed could be improved.

Any rewrite is not as important as extending an effort to provide more wishes. I think the wish mechanism is solid and does not need a change.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Looks great!

review: Approve
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Looks good. The only comment I have is that a __attribute__((unused)) is a GCCism, it should be used through a #define. Something like this:

---- some header ----

#define UNUSED __attribute__((unused))

---------------------

---- Elsewhere -----

gesture_match(GeisGestureType gesture_type,
 GeisGestureId gesture_id UNUSED,
 GeisSize attr_count UNUSED,
 GeisGestureAttr * attrs, int state)

--------------------

Revision history for this message
Chase Douglas (chasedouglas) wrote :

There's a point at which abstractions get in the way instead of helping. We don't have any plans even in the really really far future of building any of utouch with a different compiler, so I would prefer to leave gccisms until we decide to change that. OS X uses gcc (and/or llvm which probably uses the same attribute), and I'm sure one can use gcc on windows too.

Unmerged revisions

94. By Stephen M. Webb

More fixes under Oneriric builds.

93. By Stephen M. Webb

tagged range initializers as GNU extensions.

92. By Stephen M. Webb

More fixin's for FTBFS with -Werror.

91. By Stephen M. Webb

Adjusted build flags to pick up higher warning level.

90. By Stephen M. Webb

Cranked up compiler warning levels and fixed the subsequent build failures.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.