core: ignore unused result warning of audit_log_user_message()

Affects build on rawhide (audit-libs-4.0-8.fc40):

    src/core/nm-audit-manager.c: In function 'nm_audit_log':
    src/core/nm-audit-manager.c:188:9: error: ignoring return value of 'audit_log_user_message' declared with attribute 'warn_unused_result' [-Werror=unused-result]
      188 |         audit_log_user_message(priv->auditd_fd,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      189 |                                AUDIT_USYS_CONFIG,
          |                                ~~~~~~~~~~~~~~~~~~
      190 |                                build_message(&strbuf, BACKEND_AUDITD, fields),
          |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      191 |                                NULL,
          |                                ~~~~~
      192 |                                NULL,
          |                                ~~~~~
      193 |                                NULL,
          |                                ~~~~~
      194 |                                success);
          |                                ~~~~~~~~

86bfa9bf4f
This commit is contained in:
Thomas Haller 2024-02-07 15:39:21 +01:00 committed by Íñigo Huguet
parent b1016e3be8
commit ced0cf8005

View file

@ -185,13 +185,16 @@ nm_audit_log(NMAuditManager *self,
priv = NM_AUDIT_MANAGER_GET_PRIVATE(self);
if (priv->auditd_fd >= 0) {
audit_log_user_message(priv->auditd_fd,
AUDIT_USYS_CONFIG,
build_message(&strbuf, BACKEND_AUDITD, fields),
NULL,
NULL,
NULL,
success);
int r;
r = audit_log_user_message(priv->auditd_fd,
AUDIT_USYS_CONFIG,
build_message(&strbuf, BACKEND_AUDITD, fields),
NULL,
NULL,
NULL,
success);
(void) r;
}
#endif