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

Robert Love robert.w.love at intel.com
Mon Jul 6 19:18:40 UTC 2009


On Wed, 2009-07-01 at 16:30 -0700, Steve Ma wrote:
> Fix a build warning of strnlen, and
> removed an unused variable.
> 
Steve, what is the warning that you're fixing and how does this patch
accomplish it? Can you please update this commit message with that
information?

I see that you're adding __USE_GNU, but I don't know why...

> 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>
> 
> _______________________________________________
> devel mailing list
> devel at open-fcoe.org
> http://www.open-fcoe.org/mailman/listinfo/devel




More information about the devel mailing list