2010/10/19 Eric Blake <eblake(a)redhat.com>:
On 10/19/2010 11:06 AM, Matthias Bolte wrote:
>
> ---
>
> I pushed this under the trivial complie error fix rule :)
Thanks.
> @@ -80,7 +80,7 @@ void virAuditSend(const char *file ATTRIBUTE_UNUSED,
> const char *func, size_t li
> void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
> size_t linenr,
> const char *clienttty ATTRIBUTE_UNUSED,
> const char *clientaddr ATTRIBUTE_UNUSED,
> - enum virAuditRecordType type, bool success,
> + enum virAuditRecordType type ATTRIBUTE_UNUSED, bool
> success,
> const char *fmt, ...)
> #endif
Hmm - ATTRIBUTE_UNUSED is an indication that on some paths, the variable
might not be used; and not a requirement that it must not be used. Would
anyone object to this followup, for one less #ifdef?
diff --git i/src/util/virtaudit.c w/src/util/virtaudit.c
index 965a6e8..3226961 100644
--- i/src/util/virtaudit.c
+++ w/src/util/virtaudit.c
@@ -71,18 +71,12 @@ void virAuditLog(int logging)
}
-#if HAVE_AUDIT
-void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
size_t linenr,
- const char *clienttty, const char *clientaddr,
- enum virAuditRecordType type, bool success,
- const char *fmt, ...)
-#else
-void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
size_t linenr,
+void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
+ size_t linenr,
const char *clienttty ATTRIBUTE_UNUSED,
const char *clientaddr ATTRIBUTE_UNUSED,
enum virAuditRecordType type ATTRIBUTE_UNUSED, bool
success,
const char *fmt, ...)
-#endif
{
char *str = NULL;
va_list args;
ACK.
Matthias