Running -Wall -Werror on glib



I've just run compilation with -Wall -Wextra on glib (version from
git). There are several types of error:
- Unused parameters and similar errors to which solutionis to tell
compilator to ignore it
- Unused variables and other. Since it is not a highly secure
pseudorandom generator I guess they can be safly secured.
- Apparent errors which are probably an error in interface.

The solution to first is to add extra code to a few places. The second
is simply remove the unused variables. The third case is harder as it
affects API.

For example the g_ptr_array_set_size (array, -1) is perfectly legal call
although the exact behaviour is undefined as I believe. Changing the
gint to guint would:
- Change nothing  for the 'non-purist' as the for (int i = ...) ... will
still work (the cast will be performed. May be a warning be generated -
but they are 'non-purist').
- It will help debuging for 'purist' as some errors may be detected.

I have 2 questions:
- should I work on some cleaning of the glib compilation? I.e. if such
type of patches will be commited at all or is it a waste of my time.
- should I 'fix' also a API in such patches, the API is too
'standarised' to do it now (if I submit around 2.0 it would be accepted)
or there are other reson of doing such parts in this specific way?

Regards
PS. Why git repo is  not updated since some time?
PPS. I'm attaching a small patch for some of the issues:







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]