compiler: Provide LIBPLDM_CC_UNUSED
Ensure that we have __has_attribute available, and then further
ensure that the unused attribute is provided. Once satisfied, define
LIBPDLM_CC_UNUSED and replace raw use of __attribute__((unused)).
Change-Id: I2433039297d5fdedb8b8d99b30e73e4542d9069f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/requester/pldm.c b/src/requester/pldm.c
index 17d2492..8e88635 100644
--- a/src/requester/pldm.c
+++ b/src/requester/pldm.c
@@ -1,4 +1,5 @@
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
+#include "compiler.h"
#include <libpldm/base.h>
#include <libpldm/pldm.h>
#include <libpldm/transport.h>
@@ -155,7 +156,7 @@
LIBPLDM_ABI_DEPRECATED
pldm_requester_rc_t pldm_recv(mctp_eid_t eid, int mctp_fd,
- __attribute__((unused)) uint8_t instance_id,
+ LIBPLDM_CC_UNUSED uint8_t instance_id,
uint8_t **pldm_resp_msg, size_t *resp_msg_len)
{
pldm_requester_rc_t rc =