126 lines
3.9 KiB
Diff
126 lines
3.9 KiB
Diff
From 4d996fd760ccd1b25b1e96284d411916b3a97b42 Mon Sep 17 00:00:00 2001
|
|
From: Mark Rustad <mark.d.rustad@intel.com>
|
|
Date: Thu, 25 Oct 2012 04:49:36 +0000
|
|
Subject: [PATCH 5/7] build: Fix new warnings made by gcc 4.7
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
This fixes a number of warning messages now generated by
|
|
-Wall with newer versions of gcc. The warnings resolved
|
|
are all of the type:
|
|
|
|
warning: variable '<variable>' set but not used
|
|
|
|
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
|
|
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
|
|
Signed-off-by: Robert Love <robert.w.love@intel.com>
|
|
Signed-off-by: Petr Šabata <contyk@redhat.com>
|
|
---
|
|
fcoeadm_display.c | 4 ++--
|
|
fcoemon.c | 5 +----
|
|
lib/rtnetlink.c | 4 ----
|
|
3 files changed, 3 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
|
|
index 56401dc..85aa0a0 100644
|
|
--- a/fcoeadm_display.c
|
|
+++ b/fcoeadm_display.c
|
|
@@ -246,6 +246,8 @@ static void show_target_info(const char *symbolic_name,
|
|
ifname = get_ifname_from_symbolic_name(symbolic_name);
|
|
|
|
rc = sa_sys_read_line(rp_info->OSDeviceName, "roles", buf, sizeof(buf));
|
|
+ if (rc)
|
|
+ strncpy(buf, "Unknown", sizeof(buf));
|
|
printf(" Interface: %s\n", ifname);
|
|
printf(" Roles: %s\n", buf);
|
|
|
|
@@ -1223,7 +1225,6 @@ enum fcoe_status display_adapter_info(const char *ifname)
|
|
struct hba_name_table_list *hba_table_list = NULL;
|
|
enum fcoe_status rc = SUCCESS;
|
|
int i, j, num_hbas = 0;
|
|
- HBA_HANDLE hba_handle;
|
|
HBA_PORTATTRIBUTES *port_attrs;
|
|
HBA_PORTATTRIBUTES *sport_attrs;
|
|
HBA_ADAPTERATTRIBUTES *hba_attrs;
|
|
@@ -1251,7 +1252,6 @@ enum fcoe_status display_adapter_info(const char *ifname)
|
|
hba_table_list->hba_table[i].displayed)
|
|
continue;
|
|
|
|
- hba_handle = hba_table_list->hba_table[i].hba_handle;
|
|
port_attrs = &hba_table_list->hba_table[i].port_attrs;
|
|
hba_attrs = &hba_table_list->hba_table[i].hba_attrs;
|
|
|
|
diff --git a/fcoemon.c b/fcoemon.c
|
|
index daf9fab..13977eb 100644
|
|
--- a/fcoemon.c
|
|
+++ b/fcoemon.c
|
|
@@ -2326,7 +2326,6 @@ static void fcm_dcbd_cmd_resp(char *resp, cmd_status st)
|
|
u_int32_t ver;
|
|
u_int32_t cmd;
|
|
u_int32_t feature;
|
|
- u_int32_t subtype;
|
|
u_int32_t state;
|
|
char *ep;
|
|
char *cp;
|
|
@@ -2352,7 +2351,7 @@ static void fcm_dcbd_cmd_resp(char *resp, cmd_status st)
|
|
FCM_LOG("parse error on resp feature: resp %s", resp);
|
|
return;
|
|
}
|
|
- subtype = fcm_get_hex(resp + DCB_SUBTYPE_OFF, DCB_SUBTYPE_LEN, &ep);
|
|
+ fcm_get_hex(resp + DCB_SUBTYPE_OFF, DCB_SUBTYPE_LEN, &ep);
|
|
if (ep != NULL) {
|
|
FCM_LOG("parse error on resp subtype: resp %s", resp);
|
|
return;
|
|
@@ -2791,7 +2790,6 @@ static void fcm_handle_changes()
|
|
{
|
|
struct fcm_netif *ff;
|
|
struct fcoe_port *p;
|
|
- int i;
|
|
|
|
/*
|
|
* Perform pending actions (dcbd queries) on network interfaces.
|
|
@@ -2802,7 +2800,6 @@ static void fcm_handle_changes()
|
|
/*
|
|
* Perform actions on FCoE ports
|
|
*/
|
|
- i = 0;
|
|
p = fcoe_config.port;
|
|
while (p) {
|
|
ff = fcm_netif_lookup(p->real_ifname);
|
|
diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c
|
|
index 38ef802..ddaeb16 100644
|
|
--- a/lib/rtnetlink.c
|
|
+++ b/lib/rtnetlink.c
|
|
@@ -371,12 +371,10 @@ static ssize_t rtnl_send_getlink(int s, int ifindex, char *name)
|
|
static int rtnl_getlinkname_handler(struct nlmsghdr *nh, void *arg)
|
|
{
|
|
char *name = arg;
|
|
- struct ifinfomsg *ifm;
|
|
struct rtattr *ifla[__IFLA_MAX];
|
|
|
|
switch (nh->nlmsg_type) {
|
|
case RTM_NEWLINK:
|
|
- ifm = NLMSG_DATA(nh);
|
|
parse_ifinfo(ifla, nh);
|
|
strncpy(name, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ);
|
|
return 0;
|
|
@@ -413,14 +411,12 @@ struct vlan_identifier {
|
|
static int rtnl_find_vlan_handler(struct nlmsghdr *nh, void *arg)
|
|
{
|
|
struct vlan_identifier *vlan = arg;
|
|
- struct ifinfomsg *ifm;
|
|
struct rtattr *ifla[__IFLA_MAX];
|
|
struct rtattr *linkinfo[__IFLA_INFO_MAX];
|
|
struct rtattr *vlaninfo[__IFLA_VLAN_MAX];
|
|
|
|
switch (nh->nlmsg_type) {
|
|
case RTM_NEWLINK:
|
|
- ifm = NLMSG_DATA(nh);
|
|
parse_ifinfo(ifla, nh);
|
|
if (!ifla[IFLA_LINK])
|
|
break;
|
|
--
|
|
1.7.11.7
|
|
|