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/tests/dsp/bios_table_iter.c b/tests/dsp/bios_table_iter.c
index a3228fc..7260054 100644
--- a/tests/dsp/bios_table_iter.c
+++ b/tests/dsp/bios_table_iter.c
@@ -9,12 +9,14 @@
 #include <stdint.h>
 #include <stdlib.h>
 
+#include "compiler.h"
+
 /* NOLINTNEXTLINE(bugprone-suspicious-include) */
 #include "dsp/bios_table.c"
 
 /* Satisfy the symbol needs of bios_table.c */
-uint32_t crc32(const void* data __attribute__((unused)),
-               size_t size __attribute__((unused)))
+uint32_t crc32(const void* data LIBPLDM_CC_UNUSED,
+               size_t size LIBPLDM_CC_UNUSED)
 {
     return 0;
 }