Re: [patch] don't compile unused code in gmessages.c



Sven Neumann <sven gimp org> writes:

> Hi,
> 
> here's a small patch that puts printf_string_upper_bound()
> into #if !HAVE_C99_VSNPRINTF  ...  #endif. The patch 
> assumes that HAVE_C99_VSNPRINTF implies HAVE_VSNPRINTF
> but I think this is a valid assumption. OK to commit ?
> 
> 
> Salut, Sven
> 
> Index: glib/gmessages.c
> ===================================================================
> RCS file: /cvs/gnome/glib/glib/gmessages.c,v
> retrieving revision 1.39
> diff -u -p -r1.39 gmessages.c
> --- glib/gmessages.c	2001/12/06 22:37:05	1.39
> +++ glib/gmessages.c	2001/12/28 14:16:03
> @@ -71,10 +71,11 @@ struct _GLogHandler
>  
>  
>  /* --- prototypes --- */
> +#if !HAVE_C99_VSNPRINTF

We _always_ use '#ifndef' for such usages.

>  static gsize printf_string_upper_bound (const gchar *format,
>  					gboolean     may_warn,
>  					va_list      args);
> -
> +#endif

We typically do #endif /* !HAVE_C99_VSNPRINTF */ for
clarity.

Otherwise, looks fine to commit.

Regards,
                                        Owen



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