Skip to contentSkip to conversation

mstflint source code cleanup patches

PATCH New Bart Van Assche 1 participant 5 messages Nov 29, 2015 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

cover mstflint source code cleanup patches

These four patches bring the mstflint coding style closer to that of the other RDMA user space software. The patches in this series are:

0001-Fix-several-automake-warnings.patch 0002-Makefile.am-Remove-the-undefined-variable-MFT_EXT_LI.patch 0003-crd_read_line-Rework-code-to-suppress-a-compiler-war.patch 0004-Fix-compiler-warnings-about-set-but-not-used-variabl.patch --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/4 Fix several automake warnings

Avoid that automake reports the following warning messages:

configure.ac:13: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see:
configure.ac:13: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
small_utils/Makefile.am:50: warning: compiling 'mtserver.c' with per-target flags requires 'AM_PROG_CC_C_O' in 'configure.ac'
warning: 'libdev_mgt.a': linking libraries using a non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac'
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

---
 cmdif/Makefile.am            | 2 +-
 cmdparser/Makefile.am        | 2 --
 configure.ac                 | 4 +++-
 dev_mgt/Makefile.am          | 2 +-
 flint/Makefile.am            | 2 +-
 mflash/Makefile.am           | 2 +-
 mft_utils/Makefile.am        | 2 +-
 mlxconfig/Makefile.am        | 2 +-
 mlxfwops/lib/Makefile.am     | 2 +-
 mstdump/crd_lib/Makefile.am  | 2 +-
 mstdump/crd_main/Makefile.am | 2 +-
 mtcr_ul/Makefile.am          | 2 +-
 reg_access/Makefile.am       | 2 +-
 small_utils/Makefile.am      | 2 +-
 tools_layouts/Makefile.am    | 2 +-
 tools_res_mgmt/Makefile.am   | 2 +-
 16 files changed, 17 insertions(+), 17 deletions(-)
cmdif/Makefile.am +1 -1
index 78aba47..8c03fe9 100644
@@ -34,7 +34,7 @@
 USER_DIR = $(top_srcdir)
 MTCR_DIR = $(USER_DIR)/include/mtcr_ul
 TOOLS_LAYOUTS_DIR = $(USER_DIR)/tools_layouts
-INCLUDES = -I. -I../common -I../tools_layouts  -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul
+AM_CPPFLAGS = -I. -I../common -I../tools_layouts  -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul
 
 AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) -DCMDIF_EXPORTS
 CMDIF_VERSION = 1
cmdparser/Makefile.am +0 -2
index 9696f71..952a074 100644
@@ -32,8 +32,6 @@
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
 
-INCLUDES =
-
 AM_CPPFLAGS = -W  -g -MP -MD -fPIC
 
 noinst_LIBRARIES = libcmdparser.a
configure.ac +3 -1
index be0f9d1..04fb61d 100644
@@ -10,11 +10,13 @@ AC_SUBST([VERSION])
 
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_SRCDIR([README])
-AM_INIT_AUTOMAKE(mstflint, 4.1.0)
+AM_INIT_AUTOMAKE([-Wall foreign])
 
 dnl Checks for programs
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_CXX
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_CONFIG_HEADERS( config.h )
 
dev_mgt/Makefile.am +1 -1
index 703a27a..147f7aa 100644
@@ -32,7 +32,7 @@
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
 
-INCLUDES = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/common  -I$(top_srcdir)/include/mtcr_ul
+AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/common  -I$(top_srcdir)/include/mtcr_ul
 
 AM_CFLAGS = -W -Wall -g -MP -MD -Wswitch-enum $(COMPILER_FPIC) -DMTCR_EXPORT
 noinst_LIBRARIES = libdev_mgt.a
flint/Makefile.am +1 -1
index f001515..96bb6ad 100755
@@ -38,7 +38,7 @@ LAYOUTS_DIR = $(top_srcdir)/tools_layouts
 MFT_UTILS_DIR = $(top_srcdir)/mft_utils
 CMDIF_DIR   = $(top_srcdir)/cmdif
 
-INCLUDES = -I$(top_srcdir) -I$(srcdir) -I$(MTCR_DIR) -I$(MFLASH_DIR) -I$(COMMON_DIR) \
+AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(MTCR_DIR) -I$(MFLASH_DIR) -I$(COMMON_DIR) \
            -I$(LAYOUTS_DIR) -I$(MFT_UTILS_DIR)
 
 mstflint_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DEXTERNAL
mflash/Makefile.am +1 -1
index 950cabd..c45351a 100644
@@ -31,7 +31,7 @@
 #--
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
-INCLUDES= -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \
+AM_CPPFLAGS= -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \
           -I$(top_srcdir)/cmdif -I$(top_srcdir)/tools_res_mgmt
 
 AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG}
mft_utils/Makefile.am +1 -1
index ad9ad8e..ebb3bf3 100644
@@ -32,7 +32,7 @@
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
 USER_DIR = $(top_srcdir)
-INCLUDES = -I. -I$(USER_DIR)/common
+AM_CPPFLAGS = -I. -I$(USER_DIR)/common
 
 AM_CFLAGS = -MD -pipe -Wall -W -Werror
 
mlxconfig/Makefile.am +1 -1
index f4ce674..2b2fd3e 100755
@@ -42,7 +42,7 @@ UTILS_LIB = $(USER_DIR)/mft_utils/libmftutils.a
 CMDIF_DIR = $(USER_DIR)/cmdif
 
 
-INCLUDES = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\
+AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\
            -I$(MFT_EXT_LIBS_INC_DIR) -I $(LAYOUTS_DIR) -I$(MFT_EXT_LIBS_INC_DIR)/zlib -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR)
 
 AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe
mlxfwops/lib/Makefile.am +1 -1
index 050c2fc..8690345 100755
@@ -40,7 +40,7 @@ LAYOUTS_DIR = $(top_srcdir)/tools_layouts
 UTILS_LIB = $(top_srcdir)/mft_utils
 UEFI_COMMON_DIR = $(top_srcdir)/mlxfwops/uefi_c
 
-INCLUDES = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_libs/json -I$(MINIXZ_DIR)\
+AM_CPPFLAGS = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_libs/json -I$(MINIXZ_DIR)\
            -I$(COMMON_DIR) -I$(MFT_EXT_LIBS_INC_DIR)/zlib -I $(LAYOUTS_DIR) -I$(top_srcdir)/common -I$(UTILS_LIB) -I$(UEFI_COMMON_DIR)
 
 MLXFWOPS_VERSION = 1
mstdump/crd_lib/Makefile.am +1 -1
index f3e405b..c884184 100755
@@ -33,7 +33,7 @@
 # Makefile.am -- Process this file with automake to produce Makefile.in
 
 
-INCLUDES =	-I$(top_srcdir) -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
+AM_CPPFLAGS =	-I$(top_srcdir) -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
 AM_CFLAGS = -Wall -W -g -MP -MD -pipe -Wno-unused-function  $(COMPILER_FPIC) -DMTCR_EXPORT -DMST_UL -DDATA_PATH=\"$(pkgdatadir)\"
 
 noinst_LIBRARIES = libcrdump.a
mstdump/crd_main/Makefile.am +1 -1
index 0c096d4..dd7b32e 100755
@@ -31,7 +31,7 @@
 #--
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
-INCLUDES = -I$(top_srcdir) -I$(srcdir)/../crd_lib -I$(top_srcdir)/include/mtcr_ul
+AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/../crd_lib -I$(top_srcdir)/include/mtcr_ul
 AM_CFLAGS = -MD -pipe -g -Wall -W
 
 bin_PROGRAMS = mstregdump
mtcr_ul/Makefile.am +1 -1
index dd1b68d..63c7d72 100644
@@ -31,7 +31,7 @@
 #--
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
-INCLUDES = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
+AM_CPPFLAGS = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
 
 lib_LIBRARIES = libmtcr_ul.a
 
reg_access/Makefile.am +1 -1
index 3e56406..05e5bfe 100644
@@ -36,7 +36,7 @@ COMMON_DIR = $(top_srcdir)/common
 LAYOUTS_DIR = $(top_srcdir)/tools_layouts
 USER_DIR = $(top_srcdir)
 
-INCLUDES = -I. -I$(USER_DIR) -I$(srcdir) -I$(LAYOUTS_DIR) -I$(USER_DIR)/include/mtcr_ul
+AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(srcdir) -I$(LAYOUTS_DIR) -I$(USER_DIR)/include/mtcr_ul
 
 AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC)
 
small_utils/Makefile.am +1 -1
index 838a724..d7d8ff4 100644
@@ -30,7 +30,7 @@
 # SOFTWARE.
 #--
 
-INCLUDES= -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
+AM_CPPFLAGS = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common
 
 LDADD= ../mtcr_ul/libmtcr_ul.a -ldl
 
tools_layouts/Makefile.am +1 -1
index f085849..2bd623e 100644
@@ -31,7 +31,7 @@
 #--
 
 # Makefile.am -- Process this file with automake to produce Makefile.in
-INCLUDES = -I$(top_srcdir)/mtcr_ul -I$(top_srcdir)/common
+AM_CPPFLAGS = -I$(top_srcdir)/mtcr_ul -I$(top_srcdir)/common
 AM_CFLAGS = -Wall -W -g -MP -MD -pipe $(COMPILER_FPIC)
 noinst_LIBRARIES = libtools_layouts.a
 
tools_res_mgmt/Makefile.am +1 -1
index e155ed4..64d5b71 100644
@@ -33,7 +33,7 @@
 
 USER_DIR = $(top_srcdir)
 MTCR_DIR = $(USER_DIR)/include/mtcr_ul
-INCLUDES = -I. -I../common -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul
+AM_CPPFLAGS = -I. -I../common -I$(MTCR_DIR) -I.. -I$(USER_DIR)/mtcr_ul
 
 AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) 
 noinst_LIBRARIES = libtools_res_mgmt.a
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 2/4 Makefile.am: Remove the undefined variable MFT_EXT_LIBS_INC_DIR

In reply to a message not in the archive

This avoids that the option sequence "-I -I" is passed to the compiler, a sequence that causes weird error messages to be printed.

---
 mlxconfig/Makefile.am    | 2 +-
 mlxfwops/lib/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
mlxconfig/Makefile.am +1 -1
index 2b2fd3e..c9189aa 100755
@@ -43,7 +43,7 @@ CMDIF_DIR = $(USER_DIR)/cmdif
 
 
 AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\
-           -I$(MFT_EXT_LIBS_INC_DIR) -I $(LAYOUTS_DIR) -I$(MFT_EXT_LIBS_INC_DIR)/zlib -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR)
+           -I $(LAYOUTS_DIR) -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR)
 
 AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe
 bin_PROGRAMS = mstconfig
mlxfwops/lib/Makefile.am +1 -1
index 8690345..c04d333 100755
@@ -41,7 +41,7 @@ UTILS_LIB = $(top_srcdir)/mft_utils
 UEFI_COMMON_DIR = $(top_srcdir)/mlxfwops/uefi_c
 
 AM_CPPFLAGS = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_libs/json -I$(MINIXZ_DIR)\
-           -I$(COMMON_DIR) -I$(MFT_EXT_LIBS_INC_DIR)/zlib -I $(LAYOUTS_DIR) -I$(top_srcdir)/common -I$(UTILS_LIB) -I$(UEFI_COMMON_DIR)
+           -I$(COMMON_DIR) -I $(LAYOUTS_DIR) -I$(top_srcdir)/common -I$(UTILS_LIB) -I$(UEFI_COMMON_DIR)
 
 MLXFWOPS_VERSION = 1
 
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH 3/4 crd_read_line(): Rework code to suppress a compiler warning

In reply to a message not in the archive

Avoid that gcc prints a warning about not checking the result of fgets().

---
 mstdump/crd_lib/crdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mstdump/crd_lib/crdump.c +2 -2
index 451a944..3e3c4bc 100755
@@ -504,8 +504,8 @@ static int crd_read_line(IN FILE *fd, OUT char *tmp) {
         if (!feof(fd)) {
             int c = fgetc(fd);
             if (c == '#') {
-                char* _ptr=fgets (tmp, 300, fd);
-                (void)_ptr;//avoid warning
+                if (fgets(tmp, 300, fd)) {
+                }
                 tmp[0] = 0;
                 continue;
             }
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

PATCH 4/4 Fix compiler warnings about set-but-not-used variables

In reply to a message not in the archive

Recent gcc versions emit a warning if a variable is set but not used. Suppress these warnings by removing dummy assignments to unused arguments. Additionally, enable the compiler command-line option -Wno-unused-parameter and remove the '(void)arg' statements that thereby became superfluous.

---
 cmdif/tools_cif.c                            |   1 -
 cmdparser/my_getopt.c                        |   3 -
 common/compatibility.h                       |   7 +
 flint/Makefile.am                            |   2 +-
 flint/subcommands.cpp                        |   5 -
 mflash/Makefile.am                           |   2 +-
 mflash/mflash.c                              |  15 +-
 mlxconfig/Makefile.am                        |   2 +-
 mlxconfig/mlxcfg_param_lib.cpp               |  19 -
 mlxconfig/mlxcfg_param_lib.h                 |  10 +-
 mlxconfig/mlxcfg_ui.cpp                      |   1 -
 mlxfwops/lib/Makefile.am                     |   2 +-
 mlxfwops/lib/flint_io.cpp                    |   5 +-
 mlxfwops/lib/fs2_ops.cpp                     |  31 --
 mlxfwops/lib/fs3_ops.cpp                     |  17 +-
 mlxfwops/lib/fw_ops.cpp                      |   4 -
 mtcr_ul/Makefile.am                          |   2 +-
 mtcr_ul/mtcr_ib_ofed.c                       |   1 -
 mtcr_ul/mtcr_ul.c                            |  22 +-
 mtcr_ul/mtcr_ul_icmd_cif.c                   |   1 -
 small_utils/mcra.c                           |   1 -
 tools_layouts/cibfw_layouts.c                | 249 ----------
 tools_layouts/cx4fw_layouts.c                |  95 ----
 tools_layouts/register_access_open_layouts.c |  49 --
 tools_layouts/register_access_sib_layouts.c  |  97 ----
 tools_layouts/tools_open_layouts.c           | 685 ---------------------------
 26 files changed, 25 insertions(+), 1303 deletions(-)
cmdif/tools_cif.c +0 -1
index c6afc68..d767ada 100644
@@ -132,7 +132,6 @@ const char* tcif_err2str(MError rc) {
 MError tcif_cr_mbox_supported(mfile* dev)
 {
 #if defined(__FreeBSD__) || defined(UEFI_BUILD)
-    (void)dev;
     return ME_NOT_IMPLEMENTED;
 #else
     return tools_cmdif_is_cr_mbox_supported(dev);
cmdparser/my_getopt.c +0 -3
index be6281d..6e64b35 100755
@@ -394,9 +394,6 @@
    /* Start processing options with ARGV-element 1 (since ARGV-element 0
       is the program name); the sequence of previously skipped
       non-option ARGV-elements is empty.  */
-   // avoid compiler warnings
-   (void) argc;
-   (void) argv;
    first_nonopt = last_nonopt = tools_optind;
 
    nextchar = NULL;
common/compatibility.h +7 -0
index 8dc85e3..8f3b4d5 100644
@@ -215,6 +215,13 @@
 #endif
 
 /*
+ * Windows (Microsoft C Compiler)
+ */
+#ifdef _MSC_VER
+#pragma warning (disable: 4100) // 'identifier' : unreferenced formal parameter
+#endif
+
+/*
  * Windows (CYGWIN)
  */
 #if defined(__CYGWIN32__)
flint/Makefile.am +1 -1
index 96bb6ad..5ae5ee5 100755
@@ -41,7 +41,7 @@ CMDIF_DIR   = $(top_srcdir)/cmdif
 AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir) -I$(MTCR_DIR) -I$(MFLASH_DIR) -I$(COMMON_DIR) \
            -I$(LAYOUTS_DIR) -I$(MFT_UTILS_DIR)
 
-mstflint_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DEXTERNAL
+mstflint_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter -g -MP -MD -pipe -DEXTERNAL
 bin_PROGRAMS = mstflint
 
 mstflint_SOURCES = flint.cpp flint.h subcommands.cpp subcommands.h\
flint/subcommands.cpp +0 -5
index 91400a5..5b60334 100644
@@ -981,10 +981,6 @@ bool SubCommand::unzipDataFile (std::vector<u_int8_t> data, std::vector<u_int8_t
     newData.resize(destLen + 1);
     return true;
 #else
-    // avoid warnings
-    (void) data;
-    (void) newData;
-    (void) sectionName;
     reportErr(true, FLINT_NO_ZLIB_ERROR);
     return false;
 #endif
@@ -1017,7 +1013,6 @@ bool SubCommand::dumpFile(const char* confFile, std::vector<u_int8_t>& data, con
 
 bool SubCommand::checkGuidsFlags (chip_type_t ct, u_int16_t devType, u_int8_t fwType,
                             bool guidsSpecified, bool macsSpecified, bool uidsSpecified, bool ibDev, bool ethDev) {
-    (void)ibDev;
     if (guidsSpecified || macsSpecified || uidsSpecified) {
         if (ct == CT_BRIDGEX) {
             if (macsSpecified || guidsSpecified) {
mflash/Makefile.am +1 -1
index c45351a..12da860 100644
@@ -34,7 +34,7 @@
 AM_CPPFLAGS= -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_srcdir)/tools_layouts -I$(top_srcdir)/reg_access \
           -I$(top_srcdir)/cmdif -I$(top_srcdir)/tools_res_mgmt
 
-AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG}
+AM_CFLAGS = -MD -pipe -Wall -Wextra -Wno-unused-parameter -DMST_UL -g ${MFLASH_INBAND_FLAG}
 
 noinst_LIBRARIES = libmflash.a
 
mflash/mflash.c +1 -14
index c039127..4174f39 100644
@@ -100,9 +100,7 @@
 #include <windows.h>
 #define TIMER_INIT()\
     SYSTEMTIME _start, _end;\
-    int _diff_in_sec, _diff_in_ms;\
-    (void)_diff_in_sec;\
-    (void)_diff_in_ms
+    int _diff_in_sec, _diff_in_ms;
 #define TIMER_START()\
     GetSystemTime(&_start)
 #define TIMER_STOP()\
@@ -1027,7 +1025,6 @@ enum CrConstans {
 int gw_wait_ready(mflash* mfl, const char* msg) {
     u_int32_t gw_cmd;
     u_int32_t cnt = 0;
-    (void)msg; // NOT USED FOR NOW
     do {
         // Timeout checks
         if (++cnt > FLASH_CMD_CNT) {
@@ -1044,7 +1041,6 @@ int gw_wait_ready(mflash* mfl, const char* msg) {
 
 
 int empty_reset          (mflash* mfl) {
-    (void)mfl; /* avoid compiler warning */
     return MFE_OK;
 }
 
@@ -1098,8 +1094,6 @@ enum CntxCrConstants{
 
 int empty_set_bank(mflash* mfl, u_int32_t bank) {
     // NULL function - No actual work here - in ConnectX the curr_bank is written in the command word.
-    (void)mfl; // Avoid Compiler warning
-    (void)bank;   // Avoid Compiler warning
     return MFE_OK;
 }
 
@@ -1425,7 +1419,6 @@ int spi_update_num_of_banks(mflash* mfl, int prev_num_of_flashes)
 
 
 int cntx_st_spi_reset          (mflash* mfl) {
-    (void)mfl;
     return MFE_OK;
 }
 
@@ -1836,7 +1829,6 @@ int cntx_flash_init_direct_access(mflash* mfl, flash_params_t* flash_params) {
 // InfiniScale 4 (IS4) functions:
 
 int is4_init_gpios(mflash* mfl) {
-    (void)mfl;
     return MFE_NOT_IMPLEMENTED;
 }
 
@@ -2112,11 +2104,6 @@ int sx_erase_sect(mflash* mfl, u_int32_t addr)
 
 int empty_get_status(mflash* mfl, u_int8_t op_type, u_int8_t* status)
 {
-    // Avoid warnings
-    (void)mfl;
-    (void)op_type;
-    (void)status;
-
     return MFE_NOT_SUPPORTED_OPERATION;
 }
 
mlxconfig/Makefile.am +1 -1
index c9189aa..11865a4 100755
@@ -45,7 +45,7 @@ CMDIF_DIR = $(USER_DIR)/cmdif
 AM_CPPFLAGS = -I. -I$(USER_DIR) -I$(top_srcdir)/include/mtcr_ul -I$(MTCR_DIR) -I$(COMMON_DIR) $(WIN64_INC)\
            -I $(LAYOUTS_DIR) -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR)
 
-AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe
+AM_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter -g -MP -MD -pipe
 bin_PROGRAMS = mstconfig
 
 mstconfig_LDADD = $(CMDIF_DIR)/libcmdif.a ../reg_access/libreg_access.a $(LAYOUTS_LIB) $(MTCR_DIR)/libmtcr_ul.a $(MLNXOS_PPC_LIBS) $(LIBSTD_CPP) $(UTILS_LIB) $(DEV_MGT_DIR)/libdev_mgt.a -ldl
mlxconfig/mlxcfg_param_lib.cpp +0 -19
index d5481ee..ead193c 100644
@@ -399,7 +399,6 @@ bool CfgParams::checkCfg(mfile* mf)
 bool CfgParams::softLimitCheck(mfile* mf)
 {
     // by default not implemented
-    (void)mf;
     return true;
 }
 
@@ -455,8 +454,6 @@ bool SriovParams::hardLimitCheck()
 
 bool SriovParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)mf;
-    (void)param;
     return _devCapVec & SRIOV_MASK;
 }
 
@@ -624,8 +621,6 @@ u_int32_t WolParams4thGen::getParam(mlxCfgParam paramType)
 
 bool WolParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)mf;
-    (void)param;
     return ((_devCapVec & WOL_P1_MASK) && _port == 1) || ((_devCapVec & WOL_P2_MASK) && _port == 2 );
 }
 
@@ -722,7 +717,6 @@ u_int32_t WolParams5thGen::getParam(mlxCfgParam paramType)
 bool WolParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -810,8 +804,6 @@ bool BarSzParams::hardLimitCheck()
 
 bool BarSzParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)mf;
-    (void)param;
     return _devCapVec & BAR_SZ_MASK ;
 }
 
@@ -1028,8 +1020,6 @@ u_int32_t VpiParams4thGen::getParam(mlxCfgParam paramType)
 
 bool VpiParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)mf;
-    (void)param;
     return ((_devCapVec & VPI_P1_MASK) && _port == 1) || ((_devCapVec & VPI_P2_MASK) && _port == 2);
 }
 
@@ -1118,7 +1108,6 @@ bool VpiParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
     // get mtcr functions for this device (physical)
     // compare with port
     // send nvqc and check
-    (void)param;
     MError rc;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
@@ -1400,7 +1389,6 @@ bool PciParams5thGen::hardLimitCheck()
 bool TptParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTptCapabilitiesTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -1560,7 +1548,6 @@ bool TptParams5thGen::hardLimitCheck()
 
 bool InfinibandBootSettingsParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)param;
     struct tools_open_query_def_params_per_port portParams;
     int rc;
     rc = getDefaultParams4thGen(mf, _port, &portParams);
@@ -1667,7 +1654,6 @@ bool InfinibandBootSettingsParams4thGen::hardLimitCheck()
 bool IBDCParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getDcCapabilitiesTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -1802,7 +1788,6 @@ void IBDCParams5thGen::updateClassAttrFromTlv(void* tlv)
 bool PortBootStateParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -1889,7 +1874,6 @@ void PortBootStateParams5thGen::updateClassAttrFromTlv(void* tlv)
 bool RoCENextProtocolParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -1975,7 +1959,6 @@ void RoCENextProtocolParams5thGen::updateClassAttrFromTlv(void* tlv)
 bool RoCECCParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -2072,7 +2055,6 @@ void RoCECCParams5thGen::updateClassAttrFromTlv(void* tlv)
 bool RoCECCEcnParams5thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
     MError rc;
-    (void)param;
     bool suppRead, suppWrite;
     rc = nvqcCom5thGen(mf, getTlvTypeBe(), suppRead, suppWrite);
     if (rc) {
@@ -2494,7 +2476,6 @@ void RoCECCEcnParams5thGen::updateClassAttrFromTlv(void* tlv)
 
 bool PrebootBootSettingsParams4thGen::cfgSupported(mfile* mf, mlxCfgParam param)
 {
-    (void)param;
     struct tools_open_query_def_params_per_port portParams;
     int rc;
     rc = getDefaultParams4thGen(mf, _port, &portParams);
mlxconfig/mlxcfg_param_lib.h +8 -2
index 3c1257b..7cf2819 100644
@@ -252,8 +252,14 @@ protected:
     int getDefaultParams4thGen(mfile* mf, struct tools_open_query_def_params_global* global_params);
     int getDefaultParams4thGen(mfile* mf, int port, struct tools_open_query_def_params_per_port* port_params);
 
-    virtual void updateTlvFromClassAttr(void* tlv) {(void)tlv; throw std::logic_error("Function Not Implemented");}
-    virtual void updateClassAttrFromTlv(void* tlv) {(void)tlv; throw std::logic_error("Function Not Implemented");}
+    virtual void updateTlvFromClassAttr(void* tlv)
+    {
+	throw std::logic_error("Function Not Implemented");
+    }
+    virtual void updateClassAttrFromTlv(void* tlv)
+    {
+	throw std::logic_error("Function Not Implemented");
+    }
 
     u_int64_t _devCapVec; // relevant for 4th gen devices
     bool _updated; // set true on get and false on set
mlxconfig/mlxcfg_ui.cpp +0 -1
index f78132a..2393992 100644
@@ -302,7 +302,6 @@ mlxCfgStatus MlxCfg::queryDevCfg(const char* dev,const char* pci, int devIndex,
     bool rc;
     bool failedToGetCfg = false;
     bool nothingSupported = true;
-    (void) pci;
     // print opening
     printf("\nDevice #%d:\n", devIndex);
     printf("----------\n\n");
mlxfwops/lib/Makefile.am +1 -1
index c04d333..31c81d0 100755
@@ -45,7 +45,7 @@ AM_CPPFLAGS = -I$(srcdir) -I$(MTCR_INC_DIR) -I$(MFLASH_DIR) -I$(top_srcdir)/ext_
 
 MLXFWOPS_VERSION = 1
 
-AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DNO_MFA_SUPPORT
+AM_CXXFLAGS = -Wall -Wextra -Wno-unused-parameter -g -MP -MD -pipe -DNO_MFA_SUPPORT
 
 noinst_LIBRARIES = libmlxfwops.a
 
mlxfwops/lib/flint_io.cpp +1 -4
index 5cb77c5..1dfd115 100755
@@ -67,7 +67,6 @@ bool FImage::open(const char *fname, bool read_only, bool advErr)
     int                r_cnt;
     FILE              *fh;
 
-    (void)read_only;  // FImage can be opened only for read so we ignore compiler warnings
     _advErrors = advErr;
 
     fh = fopen(fname, "rb");
@@ -276,9 +275,9 @@ bool Flash::open(const char *device, bool force_lock, bool read_only, int num_of
 {
     // Open device
     int rc;
+
     _advErrors = advErr;
     _ignore_cache_replacement = ignore_cashe_replacement ? true : false;
-    (void)read_only; // not used , avoid compiler warnings TODO: remove this var from function def
     rc = mf_open_adv(&_mfl, device, num_of_banks, flash_params, ignore_cashe_replacement, cx3_fw_access);
     //printf("device: %s , forceLock: %s , read only: %s, num of banks: %d, flash params is null: %s, ocr: %d, rc: %d\n",
     //		device, force_lock? "true":"false", read_only?"true":"false", num_of_banks, flash_params? "no":"yes", ignore_cashe_replacement, rc);
@@ -421,8 +420,6 @@ bool Flash::write_phy(u_int32_t phy_addr, u_int32_t data)
 
 bool Flash::write_phy(u_int32_t phy_addr, void* data, int cnt, bool noerase)
 {
-    // Avoid warning
-    (void)noerase;
     NATIVE_PHY_ADDR_FUNC(write_with_erase, (phy_addr, data, cnt));
 }
 
mlxfwops/lib/fs2_ops.cpp +0 -31
index c3151ad..79851fa 100644
@@ -572,9 +572,6 @@ bool Fs2Operations::Fs2Verify(VerifyCallBack verifyCallBackFunc, bool is_striped
 }
 bool Fs2Operations::FwVerify(VerifyCallBack verifyCallBackFunc, bool isStripedImage, bool showItoc)
 {
-    // avoid compiler warrning (showItoc is not used in fs2)
-    (void)showItoc;
-
     initSectToRead(FULL_VERIFY);
     if (!Fs2Verify(verifyCallBackFunc, isStripedImage)) {
         // empty the initSectToRead
@@ -852,10 +849,6 @@ bool Fs2Operations::Fs2FailSafeBurn(Fs2Operations &imageOps,
                                   bool      allow_nofs,
                                   const char* pre_message,
                                   ProgressCallBack progressFunc) {
-    //we do not use pre_message, avoid warrning
-	//TODO: remove pre_message from function definition
-    (void)pre_message;
-
     Flash  *f = (Flash*)(this->_ioAccess);
     FImage *fim = (FImage*)(imageOps._ioAccess);
 
@@ -1498,17 +1491,11 @@ bool Fs2Operations::FwReadRom(std::vector<u_int8_t>& romSect)
 
 bool Fs2Operations::FwSetMFG(fs3_uid_t baseGuid, PrintCallBack callBackFunc)
 {
-    // avoid compiler warrnings
-    (void)baseGuid;
-    (void)callBackFunc;
     return errmsg("This command is not supported for FS2 FW image.");
 }
 
 bool Fs2Operations::FwSetMFG(guid_t baseGuid, PrintCallBack callBackFunc)
 {
-    // avoid compiler warrnings
-    (void)baseGuid;
-    (void)callBackFunc;
     return errmsg("This command is not supported for FS2 FW image.");
 }
 
@@ -1534,7 +1521,6 @@ bool Fs2Operations::FwGetSection (u_int32_t sectType, std::vector<u_int8_t>& sec
 
 bool Fs2Operations::ModifyVSDSection(const char *vsd, ProgressCallBack callBackFunc)
 {
-	(void)callBackFunc; /* avoid compiler warning*/
     u_int32_t length = _fwImgInfo.lastImageAddr;
     vector<u_int8_t> data(length);
 
@@ -1732,9 +1718,6 @@ bool Fs2Operations::Fs2SetGuidsForBlank(sg_params_t& sgParam)
 
 bool Fs2Operations::Fs2SetGuids(sg_params_t& sgParam, PrintCallBack callBackFunc, ProgressCallBack progressFunc)
 {
-    // avoid compiler warrnings
-    (void)callBackFunc;
-    //
     bool ib_dev, eth_dev, bx_dev;
     // Get the FW types
     bx_dev = _fwImgInfo.ext_info.chip_type == CT_BRIDGEX;
@@ -1762,10 +1745,6 @@ bool Fs2Operations::Fs2SetGuids(sg_params_t& sgParam, PrintCallBack callBackFunc
 bool Fs2Operations::FwSetGuids(sg_params_t& sgParam, PrintCallBack callBackFunc,
         ProgressCallBack progressFunc)
 {
-	/* avoid annoying mingw warnings*/
-	(void)callBackFunc;
-	(void)progressFunc;
-
     if (!Fs2IntQuery(true, sgParam.stripedImage)) {
         return false;
     }
@@ -1924,9 +1903,6 @@ bool Fs2Operations::FwDeleteRom(bool ignoreProdIdCheck, ProgressCallBack progres
 
 bool Fs2Operations::FwSetVSD(char* vsdStr, ProgressCallBack progressFunc, PrintCallBack printFunc)
 {
-    // avoid compiler warrnings
-    (void)printFunc;
-    //
     if (!Fs2IntQuery()) {
         return false;
     }
@@ -1951,16 +1927,11 @@ bool Fs2Operations::FwSetVSD(char* vsdStr, ProgressCallBack progressFunc, PrintC
 
 bool Fs2Operations::FwSetVPD(char* vpdFileStr, PrintCallBack callBackFunc)
 {
-    // avoid compiler warrnings
-    (void)vpdFileStr;
-    (void)callBackFunc;
     return errmsg("Setting VPD is not supported in FS2 image format.");
 }
 
 bool Fs2Operations::FwSetAccessKey(hw_key_t userKey, ProgressCallBack progressFunc)
 {
-	/*avoid compiler warning*/
-	(void)progressFunc;
     if (!Fs2IntQuery()) {
         return false;
     }
@@ -2040,8 +2011,6 @@ bool Fs2Operations::FwResetNvData()
 
 bool Fs2Operations::FwShiftDevData(PrintCallBack progressFunc)
 {
-    // avoid compiler warrnings
-    (void)progressFunc;
     return errmsg("Shifting device data sections is not supported in FS2 image format.");
 }
 
mlxfwops/lib/fs3_ops.cpp +1 -16
index f60cdb6..f71c5bc 100644
@@ -217,7 +217,6 @@ bool Fs3Operations::GetImageInfo(u_int8_t *buff)
 
     // TODO: adrianc: use the version fields once they are available in tools layouts
     GET_IMAGE_INFO_VERSION(buff, IIMajor, IIMinor);
-    (void)IIMinor;
     if (!CHECK_IMAGE_INFO_VERSION(IIMajor)) {
         return errmsg(MLXFW_UNKNOWN_SECT_VER_ERR, "Unknown IMAGE_INFO format version (%d.%d).", IIMajor, IIMinor);
     }
@@ -467,9 +466,6 @@ bool Fs3Operations::VerifyTOC(u_int32_t dtoc_addr, bool& bad_signature, VerifyCa
 
 
 bool Fs3Operations::FwVerify(VerifyCallBack verifyCallBackFunc, bool isStripedImage, bool showItoc) {
-    //dummy assignment to avoid compiler warrning (isStripedImage is not used in fs3)
-    (void)isStripedImage;
-
     struct QueryOptions queryOptions;
     queryOptions.readRom = true;
     queryOptions.quickQuery = false;
@@ -628,8 +624,6 @@ bool Fs3Operations::Fs3IntQuery(bool readRom, bool quickQuery)
 bool Fs3Operations::FwQuery(fw_info_t *fwInfo, bool readRom, bool isStripedImage)
 {
     //isStripedImage flag is not needed in FS3 image format
-    // Avoid warning - no striped image in FS3
-    (void)isStripedImage;
     if (!Fs3IntQuery(readRom)) {
         return false;
     }
@@ -1152,9 +1146,6 @@ bool Fs3Operations::FwBurnAdvanced(FwOperations *imageOps, ExtBurnParams& burnPa
 
 bool Fs3Operations::FwBurnBlock(FwOperations *imageOps, ProgressCallBack progressFunc)
 {
-    // Avoid Warning!
-    (void)imageOps;
-    (void)progressFunc;
     return errmsg("FwBurnBlock is not supported anymore in FS3 image.");
 }
 
@@ -1200,7 +1191,6 @@ bool Fs3Operations::FwReadRom(std::vector<u_int8_t>& romSect)
 
 bool Fs3Operations::FwGetSection (u_int32_t sectType, std::vector<u_int8_t>& sectInfo, bool stripedImage)
 {
-    (void) stripedImage; // unused for FS3
     //FwGetSection only supports retrieving FS3_DBG_FW_INI section atm.
     if (sectType != FS3_DBG_FW_INI) {
         return errmsg("Unsupported section type.");
@@ -1256,9 +1246,8 @@ bool Fs3Operations::FwSetMFG(guid_t baseGuid, PrintCallBack callBackFunc)
 bool Fs3Operations::FwSetGuids(sg_params_t& sgParam, PrintCallBack callBackFunc, ProgressCallBack progressFunc)
 {
     fs3_uid_t usrGuid;
+
     memset(&usrGuid, 0, sizeof(usrGuid));
-    // Avoid Warning because there is no need for progressFunc
-    (void)progressFunc;
     if (sgParam.userGuids.empty()) {
         return errmsg("Base GUID not found.");
     }
@@ -1914,8 +1903,6 @@ bool  Fs3Operations::Fs3UpdateSection(void *new_info, fs3_section_t sect_type, b
 
 bool Fs3Operations::FwSetVSD(char* vsdStr, ProgressCallBack progressFunc, PrintCallBack printFunc)
 {
-    // Avoid warning
-    (void)progressFunc;
     if (!vsdStr) {
         return errmsg("Please specify a valid VSD string.");
     }
@@ -1936,8 +1923,6 @@ bool Fs3Operations::FwSetVSD(char* vsdStr, ProgressCallBack progressFunc, PrintC
 
 bool Fs3Operations::FwSetAccessKey(hw_key_t userKey, ProgressCallBack progressFunc)
 {
-    (void)userKey;
-    (void)progressFunc;
     return errmsg("Set access key not supported.");
 }
 
mlxfwops/lib/fw_ops.cpp +0 -4
index 6ebcea3..0546fce 100644
@@ -1043,10 +1043,6 @@ void FwOperations::WriteToErrBuff(char* errBuff, const char* errStr, int size)
 
 bool FwOperations::UpdateImgCache(u_int8_t *buff, u_int32_t addr, u_int32_t size)
 {
-    //avoid compiler warrnings
-    (void)buff;
-    (void)addr;
-    (void)size;
     //in FS2 we dont have ImgCache, just in FS3 so we define a defult behaviour.
     return true;
 }
mtcr_ul/Makefile.am +1 -1
index 63c7d72..b2fc41e 100644
@@ -40,7 +40,7 @@ libmtcr_ul_a_SOURCES = mtcr_ul.c mtcr_ib.h  mtcr_int_defs.h\
 			mtcr_ul_icmd_cif.c mtcr_icmd_cif.h\
 			packets_common.c packets_common.h\
 			packets_layout.c packets_layout.h
-libmtcr_ul_a_CFLAGS = -W -Wall -g -MP -MD -fPIC -DMTCR_API="" -DMST_UL
+libmtcr_ul_a_CFLAGS = -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -g -MP -MD -fPIC -DMTCR_API="" -DMST_UL
 
 if ENABLE_INBAND
 libmtcr_ul_a_SOURCES += mtcr_ib_ofed.c
mtcr_ul/mtcr_ib_ofed.c +0 -1
index 31f0a1e..f6d0096 100644
@@ -432,7 +432,6 @@ int process_dynamic_linking(ibvs_mad *ivm, int mad_init)
     char* libs[] = {"libibmad.so.5"};
 
     u_int32_t i;
-    (void)mad_init;
     for (i = 0; i < sizeof(libs)/sizeof(libs[0]) ; i++) {
         ivm->dl_handle = dlopen (libs[i], RTLD_LAZY);
         if (ivm->dl_handle) {
mtcr_ul/mtcr_ul.c +2 -20
index b97d310..7b16f02 100644
@@ -1136,8 +1136,6 @@ int mtcr_inband_open(mfile* mf, const char* name)
     return mib_open(name,mf,0);
 
 #else
-    (void) name;
-    (void) mf;
     errno = ENOSYS;
     return -1;
 #endif
@@ -1244,7 +1242,6 @@ name_parsed:
     *force = 0;
 #ifdef __aarch64__
     // on ARM processors MMAP not supported
-    (void)force_config; // avoid warrnings
     return MTCR_ACCESS_CONFIG;
 #else
     if (force_config) {
@@ -1276,14 +1273,12 @@ int msw_reset(mfile *mf)
         return -1;
     }
 #else
-    (void)mf;
     return -1;
 #endif
 }
 
 int mhca_reset(mfile *mf)
 {
-    (void)mf;
     errno = ENOTSUP;
     return -1;
 }
@@ -1515,7 +1510,6 @@ next:
 
 void mdevices_info_destroy(dev_info* dev_info, int len)
 {
-    (void)len;
     if (dev_info)
         free(dev_info);
 }
@@ -1757,8 +1751,6 @@ mfile *mopen_fw_ctx(void* fw_cmd_context, void* fw_cmd_func, void* extra_data)
 
 unsigned char mset_i2c_slave(mfile *mf, unsigned char new_i2c_slave)
 {
-    (void)mf;
-    (void)new_i2c_slave; /* compiler warning */
     fprintf(stderr, "Warning: libmtcr: mset_i2c_slave() is not implemented and has no effect.\n");
     return 0;
 }
@@ -1796,13 +1788,12 @@ int get_inband_dev_from_pci(char* inband_dev, char* pci_dev)
 {
     unsigned domain = 0, bus = 0, dev = 0, func = 0;
     int force = 0;
-    enum mtcr_access_method access;
     DIR* d;
     struct dirent *dir;
     char dirname[DEV_DIR_MAX_SIZE], subdirname[DEV_DIR_MAX_SIZE], linkname[DEV_DIR_MAX_SIZE];
     int found = 0;
 
-    access = mtcr_parse_name(pci_dev, &force, &domain, &bus, &dev, &func);
+    mtcr_parse_name(pci_dev, &force, &domain, &bus, &dev, &func);
 
     strcpy(dirname, "/sys/class/infiniband");
     d = opendir(dirname);
@@ -1819,7 +1810,7 @@ int get_inband_dev_from_pci(char* inband_dev, char* pci_dev)
         }
         sprintf(subdirname, "%s/%s/device", dirname, dir->d_name);
         link_size = readlink(subdirname, linkname, DEV_DIR_MAX_SIZE);
-        access = mtcr_parse_name(&linkname[link_size - BDF_NAME_SIZE], &curr_force, &curr_domain, &curr_bus, &curr_dev, &curr_func);
+        mtcr_parse_name(&linkname[link_size - BDF_NAME_SIZE], &curr_force, &curr_domain, &curr_bus, &curr_dev, &curr_func);
                  
         if (domain == curr_domain && bus == curr_bus && dev == curr_dev && func == curr_func) {
             sprintf(inband_dev, "ibdr-0,%s,1", dir->d_name);
@@ -1829,7 +1820,6 @@ int get_inband_dev_from_pci(char* inband_dev, char* pci_dev)
     }
 
     closedir(d);
-    (void)access; // avoid compiler warrnings
     if (found) {
         return 0;
     } else {
@@ -1879,20 +1869,12 @@ int maccess_reg_mad(mfile *mf, u_int8_t *data)
 
 int mos_reg_access(mfile *mf, int reg_access, void *reg_data, u_int32_t cmd_type)
 {
-    (void)mf;
-    (void)reg_data; /* compiler warning */
-    (void)cmd_type; /* compiler warning */
-    (void)reg_access; /* compiler warning */
     fprintf(stderr, "Warning: libmtcr: mos_reg_access() is not implemented and has no effect.\n");
     return ME_NOT_IMPLEMENTED;
 }
 
 int maccess_reg_cmdif(mfile *mf, reg_access_t reg_access, void *reg_data, u_int32_t cmd_type)
 {
-    (void)mf;
-    (void)reg_data; /* compiler warning */
-    (void)cmd_type; /* compiler warning */
-    (void)reg_access; /* compiler warning */
     fprintf(stderr, "Warning: libmtcr: maccess_reg_cmdif() is not implemented and has no effect.\n");
     return ME_NOT_IMPLEMENTED;
 }
mtcr_ul/mtcr_ul_icmd_cif.c +0 -1
index f44f5a2..c54088f 100644
@@ -453,7 +453,6 @@ cleanup:
 
 static int icmd_init_cr(mfile *mf)
 {
-    (void)mf;
     return ME_NOT_IMPLEMENTED;
 }
 
small_utils/mcra.c +0 -1
index 2fc9a30..85b30a1 100644
@@ -112,7 +112,6 @@ int main(int argc, char *argv[])
     }
     exit(0);
 #endif
-    (void)rc; // avoid warnings (we dont use it just assign)
     // Parse cmd line:
     if (argc < 2) {
         usage(argv[0], 1);
tools_layouts/cibfw_layouts.c +0 -249

543 lines not on this page · raw message

tools_layouts/cx4fw_layouts.c +0 -95

209 lines not on this page · raw message

tools_layouts/register_access_open_layouts.c +0 -49

109 lines not on this page · raw message

tools_layouts/register_access_sib_layouts.c +0 -97

211 lines not on this page · raw message

tools_layouts/tools_open_layouts.c +0 -685

1,343 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Part of the diff is not shown here. View the raw message.