Doesn't that create another warning about aplog_module_index_fake_use being 
unused?

Regards

Rüdiger

> -----Ursprüngliche Nachricht-----
> Von: Yann Ylavic [mailto:[email protected]]
> Gesendet: Freitag, 4. September 2015 18:13
> An: [email protected]
> Betreff: Re: httpd/trunk -Werror and warning free
> 
> On Fri, Sep 4, 2015 at 4:24 PM, Ruediger Pluem <[email protected]>
> 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.

Reply via email to