diff --git a/include/ipmitool/ipmi_fru.h b/include/ipmitool/ipmi_fru.h index 9726788..694824c 100644 --- a/include/ipmitool/ipmi_fru.h +++ b/include/ipmitool/ipmi_fru.h @@ -194,7 +194,7 @@ struct fru_multirec_powersupply { #pragma pack(0) #endif -static const char * combined_voltage_desc[] __attribute__((unused)) = { +static const char * __UNUSED__(combined_voltage_desc[]) = { "12 V", "-12 V", "5 V", "3.3 V"}; #ifdef HAVE_PRAGMA_PACK @@ -608,7 +608,7 @@ static inline time_t ipmi_fru2time_t(void *mfg_date) { return ts; } -static const char * chassis_type_desc[] __attribute__((unused)) = { +static const char * __UNUSED__(chassis_type_desc[]) = { "Unspecified", "Other", "Unknown", "Desktop", "Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower", diff --git a/include/ipmitool/ipmi_lanp.h b/include/ipmitool/ipmi_lanp.h index ce12884..ff6f390 100644 --- a/include/ipmitool/ipmi_lanp.h +++ b/include/ipmitool/ipmi_lanp.h @@ -131,7 +131,7 @@ static struct lan_param { char desc[24]; uint8_t * data; int data_len; -} ipmi_lan_params[] __attribute__((unused)) = { +} __UNUSED__(ipmi_lan_params[]) = { { IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress", NULL, 0 }, { IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support", NULL, 0 }, { IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable", NULL, 0 }, diff --git a/include/ipmitool/ipmi_pef.h b/include/ipmitool/ipmi_pef.h index a832507..9e1b701 100644 --- a/include/ipmitool/ipmi_pef.h +++ b/include/ipmitool/ipmi_pef.h @@ -112,7 +112,7 @@ struct bit_desc_map { /* description text container */ }; static struct bit_desc_map -pef_b2s_actions __attribute__((unused)) = { +__UNUSED__(pef_b2s_actions) = { BIT_DESC_MAP_ALL, { {"Alert", PEF_ACTION_ALERT}, {"Power-off", PEF_ACTION_POWER_DOWN}, @@ -124,7 +124,7 @@ BIT_DESC_MAP_ALL, } }; static struct bit_desc_map -pef_b2s_severities __attribute__((unused)) = { +__UNUSED__(pef_b2s_severities) = { BIT_DESC_MAP_ANY, { {"Non-recoverable", PEF_SEVERITY_NON_RECOVERABLE}, {"Critical", PEF_SEVERITY_CRITICAL}, @@ -136,7 +136,7 @@ BIT_DESC_MAP_ANY, } }; static struct bit_desc_map -pef_b2s_sensortypes __attribute__((unused)) = { +__UNUSED__(pef_b2s_sensortypes) = { BIT_DESC_MAP_LIST, { {"Any", 255}, {"Temperature", 1}, @@ -313,7 +313,7 @@ BIT_DESC_MAP_LIST, } }; static struct bit_desc_map * -pef_b2s_generic_ER[] __attribute__((unused)) = { +__UNUSED__(pef_b2s_generic_ER[]) = { &pef_b2s_gentype_1, &pef_b2s_gentype_2, &pef_b2s_gentype_3, @@ -356,7 +356,7 @@ struct pef_policy_entry { #endif static struct bit_desc_map -pef_b2s_policies __attribute__((unused)) = { +__UNUSED__(pef_b2s_policies) = { BIT_DESC_MAP_LIST, { {"Match-always", PEF_POLICY_FLAGS_MATCH_ALWAYS}, {"Try-next-entry", PEF_POLICY_FLAGS_PREV_OK_SKIP}, @@ -367,7 +367,7 @@ BIT_DESC_MAP_LIST, } }; static struct bit_desc_map -pef_b2s_ch_medium __attribute__((unused)) = { +__UNUSED__(pef_b2s_ch_medium) = { #define PEF_CH_MEDIUM_TYPE_IPMB 1 #define PEF_CH_MEDIUM_TYPE_ICMB_10 2 #define PEF_CH_MEDIUM_TYPE_ICMB_09 3 @@ -450,7 +450,7 @@ struct pef_cfgparm_control { #endif static struct bit_desc_map -pef_b2s_control __attribute__((unused)) = { +__UNUSED__(pef_b2s_control) = { BIT_DESC_MAP_ALL, { {"PEF", PEF_CONTROL_ENABLE}, {"PEF event messages", PEF_CONTROL_ENABLE_EVENT_MESSAGES}, @@ -656,7 +656,7 @@ struct pef_lan_cfgparm_dest_type { #endif static struct bit_desc_map -pef_b2s_lan_desttype __attribute__((unused)) = { +__UNUSED__(pef_b2s_lan_desttype) = { BIT_DESC_MAP_LIST, { {"Acknowledged", PEF_LAN_DEST_TYPE_ACK}, {"PET", PEF_LAN_DEST_TYPE_PET}, @@ -755,7 +755,7 @@ struct pef_serial_cfgparm_dest_info { #endif static struct bit_desc_map -pef_b2s_serial_desttype __attribute__((unused)) = { +__UNUSED__(pef_b2s_serial_desttype) = { BIT_DESC_MAP_LIST, { {"Acknowledged", PEF_SERIAL_DEST_TYPE_ACK}, {"TAP page", PEF_SERIAL_DEST_TYPE_TAP}, @@ -835,7 +835,7 @@ struct pef_serial_cfgparm_tap_svc_settings { #endif static struct bit_desc_map -pef_b2s_tap_svc_confirm __attribute__((unused)) = { +__UNUSED__(pef_b2s_tap_svc_confirm) = { BIT_DESC_MAP_LIST, { {"ACK", PEF_SERIAL_TAP_CONFIRMATION_ACK_AFTER_ETX}, {"211+ACK", PEF_SERIAL_TAP_CONFIRMATION_211_ACK_AFTER_ETX}, diff --git a/include/ipmitool/ipmi_picmg.h b/include/ipmitool/ipmi_picmg.h index 0bcbd93..180a30b 100644 --- a/include/ipmitool/ipmi_picmg.h +++ b/include/ipmitool/ipmi_picmg.h @@ -93,7 +93,7 @@ typedef enum picmg_busres_resource_id { } t_picmg_busres_resource_id; /* the LED color capabilities */ -static const char* led_color_str[] __attribute__((unused)) = { +static const char* __UNUSED__(led_color_str[]) = { "reserved", "BLUE", "RED", @@ -105,7 +105,7 @@ static const char* led_color_str[] __attribute__((unused)) = { }; -static const char* amc_link_type_str[] __attribute__((unused)) = { +static const char* __UNUSED__(amc_link_type_str[]) = { "RESERVED", "RESERVED1", "PCI EXPRESS", @@ -116,7 +116,7 @@ static const char* amc_link_type_str[] __attribute__((unused)) = { "STORAGE", }; -static const char* amc_link_type_ext_str[][16] __attribute__((unused)) = { +static const char* __UNUSED__(amc_link_type_ext_str[][16]) = { /* FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED */ { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" diff --git a/include/ipmitool/ipmi_sdr.h b/include/ipmitool/ipmi_sdr.h index 7fc5c6b..9001e59 100644 --- a/include/ipmitool/ipmi_sdr.h +++ b/include/ipmitool/ipmi_sdr.h @@ -776,7 +776,7 @@ struct sdr_record_list { /* unit description codes (IPMI v1.5 section 37.16) */ #define UNIT_MAX 0x90 -static const char *unit_desc[] __attribute__ ((unused)) = { +static const char *__UNUSED__(unit_desc[]) = { "unspecified", "degrees C", "degrees F", "degrees K", "Volts", "Amps", "Watts", "Joules", @@ -801,7 +801,7 @@ static const char *unit_desc[] __attribute__ ((unused)) = { /* sensor type codes (IPMI v1.5 table 36.3) / Updated to v2.0 Table 42-3, Sensor Type Codes */ #define SENSOR_TYPE_MAX 0x2C -static const char *sensor_type_desc[] __attribute__ ((unused)) = { +static const char *__UNUSED__(sensor_type_desc[]) = { "reserved", "Temperature", "Voltage", "Current", "Fan", "Physical Security", "Platform Security", "Processor", diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c index f7472b0..572bda0 100644 --- a/lib/ipmi_sel.c +++ b/lib/ipmi_sel.c @@ -420,7 +420,7 @@ ipmi_sel_add_entries_fromfile(struct ipmi_intf * intf, const char * filename) return rc; } -static struct ipmi_event_sensor_types oem_kontron_event_reading_types[] __attribute__((unused)) = { +static struct ipmi_event_sensor_types __UNUSED__(oem_kontron_event_reading_types[]) = { { 0x70 , 0x00 , 0xff, "Code Assert" }, { 0x71 , 0x00 , 0xff, "Code Assert" }, { 0, 0, 0xFF, NULL } diff --git a/src/plugins/lan/asf.h b/src/plugins/lan/asf.h index ab36d6f..dc79355 100644 --- a/src/plugins/lan/asf.h +++ b/src/plugins/lan/asf.h @@ -41,7 +41,7 @@ #define ASF_TYPE_PING 0x80 #define ASF_TYPE_PONG 0x40 -static const struct valstr asf_type_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(asf_type_vals[]) = { { 0x10, "Reset" }, { 0x11, "Power-up" }, { 0x12, "Unconditional Power-down" }, diff --git a/src/plugins/lan/rmcp.h b/src/plugins/lan/rmcp.h index b979d92..9020112 100644 --- a/src/plugins/lan/rmcp.h +++ b/src/plugins/lan/rmcp.h @@ -46,7 +46,7 @@ #define RMCP_TYPE_NORM 0x00 #define RMCP_TYPE_ACK 0x01 -static const struct valstr rmcp_type_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(rmcp_type_vals[]) = { { RMCP_TYPE_NORM, "Normal RMCP" }, { RMCP_TYPE_ACK, "RMCP ACK" }, { 0, NULL } @@ -57,7 +57,7 @@ static const struct valstr rmcp_type_vals[] __attribute__((unused)) = { #define RMCP_CLASS_IPMI 0x07 #define RMCP_CLASS_OEM 0x08 -static const struct valstr rmcp_class_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(rmcp_class_vals[]) = { { RMCP_CLASS_ASF, "ASF" }, { RMCP_CLASS_IPMI, "IPMI" }, { RMCP_CLASS_OEM, "OEM" }, diff --git a/src/plugins/lanplus/asf.h b/src/plugins/lanplus/asf.h index 7a30418..f8166eb 100644 --- a/src/plugins/lanplus/asf.h +++ b/src/plugins/lanplus/asf.h @@ -41,7 +41,7 @@ #define ASF_TYPE_PING 0x80 #define ASF_TYPE_PONG 0x40 -static const struct valstr asf_type_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(asf_type_vals[]) = { { 0x10, "Reset" }, { 0x11, "Power-up" }, { 0x12, "Unconditional Power-down" }, diff --git a/src/plugins/lanplus/rmcp.h b/src/plugins/lanplus/rmcp.h index 51dc44d..254c178 100644 --- a/src/plugins/lanplus/rmcp.h +++ b/src/plugins/lanplus/rmcp.h @@ -45,7 +45,7 @@ #define RMCP_TYPE_NORM 0x00 #define RMCP_TYPE_ACK 0x01 -static const struct valstr rmcp_type_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(rmcp_type_vals[]) = { { RMCP_TYPE_NORM, "Normal RMCP" }, { RMCP_TYPE_ACK, "RMCP ACK" }, { 0, NULL } @@ -56,7 +56,7 @@ static const struct valstr rmcp_type_vals[] __attribute__((unused)) = { #define RMCP_CLASS_IPMI 0x07 #define RMCP_CLASS_OEM 0x08 -static const struct valstr rmcp_class_vals[] __attribute__((unused)) = { +static const struct valstr __UNUSED__(rmcp_class_vals[]) = { { RMCP_CLASS_ASF, "ASF" }, { RMCP_CLASS_IPMI, "IPMI" }, { RMCP_CLASS_OEM, "OEM" },