[Open-FCoE] [PATCH] libhbalinux: Fix build warnings

Steve Ma steve.ma at intel.com
Wed Jul 1 23:30:56 UTC 2009


Fix a build warning of strnlen, and
removed an unused variable.

Signed-off-by: Steve Ma <steve.ma at intel.com>
---

 pci.c   |    1 -
 utils.h |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pci.c b/pci.c
index ee53c3d..82879bf 100644
--- a/pci.c
+++ b/pci.c
@@ -152,7 +152,6 @@ static void
 get_pci_device_info(struct pci_device *dev, struct hba_info *hba_info)
 {
 	const char *name;
-	u_int16_t class;
 	u_int8_t revision;
 	u_int8_t hdr_type;
 	char *unknown = "Unknown";
diff --git a/utils.h b/utils.h
index 13109e2..2061737 100644
--- a/utils.h
+++ b/utils.h
@@ -31,6 +31,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <dirent.h>
+#define __USE_GNU
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>




More information about the devel mailing list