Re: [Patch] Warning fixes for glib



Daniel Egger <degger fhm edu> writes:

> Hija,
> 
> while compiling on ppc-linux with gcc-3.1 (CVS) I fixed some warnings.

Looks fine with one very small comment:

> Index: gobject/testgruntime.c
> ===================================================================
> RCS file: /cvs/gnome/glib/gobject/testgruntime.c,v
> retrieving revision 1.4
> diff -u -r1.4 testgruntime.c
> --- gobject/testgruntime.c	2001/09/10 18:03:31	1.4
> +++ gobject/testgruntime.c	2001/10/29 14:15:35
> @@ -20,6 +20,7 @@
>  #define	G_LOG_DOMAIN "TestObject"
>  #include	<glib-object.h>
>  
> +#include <string.h>
>  
>  /* --- TestIface --- */
>  #define TEST_TYPE_IFACE           (test_iface_get_type ())
> Index: tests/patterntest.c
> ===================================================================
> RCS file: /cvs/gnome/glib/tests/patterntest.c,v
> retrieving revision 1.1
> diff -u -r1.1 patterntest.c
> --- tests/patterntest.c	2001/10/13 05:54:10	1.1
> +++ tests/patterntest.c	2001/10/29 14:15:35
> @@ -16,8 +16,10 @@
>   * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
>   * Boston, MA 02111-1307, USA.
>   */
> +
>  #include "glib.h"
>  
> +#include <string.h>
>  
>  /* keep enum and structure of gpattern.c and patterntest.c in sync */
>  typedef enum

The ordering that I prefer is

#include <stdhdr1>
#include <stdhdr2>

#include <glibheader1>
#include <glibheader2>

The reason for this is that we can fix problems with redefined
symbols where the standard header is first, but not where it
is second. Also, having some sort of standard for the ordering
of include headers makes it easier to find things.

Regards,
                                        Owen



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