This patch resolves warnings produced by newer versions of GCC when
-Wall is in use. These warnings are:

warning: variable '<variable>' set but not used

Signed-off-by: Mark Rustad <[email protected]>
---

 hbaapilib.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hbaapilib.c b/hbaapilib.c
index 736e9a3..386ab0d 100644
--- a/hbaapilib.c
+++ b/hbaapilib.c
@@ -433,7 +433,9 @@ HBA_LoadLibrary() {
     int                        ret;
 #endif
     HBA_STATUS         status;
+#ifdef NOTDEF
     HBA_UINT32         libversion;
+#endif /* NOTDEF */
 
     /* Open configuration file from known location */
     FILE               *hbaconf;
@@ -589,10 +591,10 @@ HBA_LoadLibrary() {
           == NULL) {
            continue;
        }
+#ifdef NOTDEF /* save for a later time... when it matters */
        libversion = ((GetVersionFunc)());
        /* Check the version of this library before loading */
        /* Actually... This wrapper is compatible with version 1 */
-#ifdef NOTDEF /* save for a later time... when it matters */
        if(libversion < HBA_LIBVERSION) {
            printf("Library version mismatch. Got %d expected %d.\n",
                   libversion, HBA_LIBVERSION);
@@ -669,7 +671,6 @@ HBA_LoadLibrary() {
 HBA_STATUS
 HBA_FreeLibrary() {
     HBAFreeLibraryFunc FreeLibraryFunc;
-    HBA_STATUS         status;
     HBA_LIBRARY_INFO   *lib_infop;
     HBA_LIBRARY_INFO   *lib_next;
     HBA_ADAPTERCALLBACK_ELEM
@@ -688,7 +689,7 @@ HBA_FreeLibrary() {
            FreeLibraryFunc = lib_infop->functionTable.FreeLibraryHandler;
            if (FreeLibraryFunc != NULL) {
                /* Free this library */
-               status = ((FreeLibraryFunc)());
+               (FreeLibraryFunc)();
            }
            dlclose(lib_infop->hLibrary);       /* Unload DLL from memory */
        }

_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to