httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: httpd/trunk -Werror and warning free
Date Fri, 04 Sep 2015 16:13:17 GMT
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