httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, Vodafone Group <ruediger.pl...@vodafone.com>
Subject AW: httpd/trunk -Werror and warning free
Date Fri, 04 Sep 2015 17:37:34 GMT
Doesn't that create another warning about aplog_module_index_fake_use being unused?

Regards

Rüdiger

> -----Ursprüngliche Nachricht-----
> Von: Yann Ylavic [mailto:ylavic.dev@gmail.com]
> Gesendet: Freitag, 4. September 2015 18:13
> An: dev@httpd.apache.org
> Betreff: Re: httpd/trunk -Werror and warning free
> 
> On Fri, Sep 4, 2015 at 4:24 PM, Ruediger Pluem <rpluem@apache.org>
> wrote:
> > AP_DECLARE_MODULE_LAST is no good alternative to AP_DECLARE_MODULE as
> it will break per module loglevels.
> > We should not introduce this API.
> 
> How about:
> 
> Index: include/http_log.h
> ===================================================================
> --- include/http_log.h    (revision 1701218)
> +++ include/http_log.h    (working copy)
> @@ -146,6 +146,13 @@
>   * use ::APLOG_NO_MODULE. This variable will usually be optimized away.
>   */
>  static int * const aplog_module_index;
> +/**
> + * Prevent "unused" warning for modules that don't use it.
> + */
> +static APR_INLINE void aplog_module_index_fake_use(void)
> +{
> +    (void)sizeof(aplog_module_index);
> +}
>  #endif /* __cplusplus */
> 
>  /**
> ?
> 
> Regards,
> Yann.
Mime
View raw message