dnl Checks for programs
AC_PROG_CC
AC_PROG_CXX
-AM_PROG_AR
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_LIBTOOL
AC_CONFIG_HEADERS( config.h )
#--
# Makefile.am -- Process this file with automake to produce Makefile.in
-AM_CFLAGS = -W -Werror -g -MP -MD ${COMPILER_FPIC}
+AM_CXXFLAGS = -W -Werror -g -MP -MD ${COMPILER_FPIC} -Wno-deprecated-declarations
noinst_LIBRARIES = libmuparser.a
noinst_HEADERS = muParser.h muParserBase.h muParserBytecode.h muParserCallback.h muParserDef.h muParserError.h muParserFixes.h muParserStack.h muParserToken.h muParserTokenReader.h muParserTemplateMagic.h
-I $(LAYOUTS_DIR) -I $(UTILS_DIR) -I$(DEV_MGT_DIR) -I$(CMDIF_DIR)
-AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe -DDATA_PATH=\"$(pkgdatadir)\"
+AM_CXXFLAGS = -Wall -W -g -MP -MD -pipe -Wno-deprecated-declarations -DDATA_PATH=\"$(pkgdatadir)\"
bin_PROGRAMS = mstconfig
mstconfig_LDADD = $(UTILS_LIB) $(EXT_LIB_DIR)/sqlite/libsqlite3.a $(EXT_LIB_DIR)/muparser/libmuparser.a\
#define XML_ROOT "config"
#define XML_DOCUMENT_START "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"\
- "<"XML_ROOT" xmlns=\"" XMLNS "\">"
-#define XML_DOCUMENT_END "</"XML_ROOT">"
+ "<" XML_ROOT " xmlns=\"" XMLNS "\">"
+#define XML_DOCUMENT_END "</" XML_ROOT ">"
#define XML_COMMENT_NODE "comment"
#define IGNORE_IF_EMPTY_NODE(n) \
//check fingerprint in first line
vector<string>::iterator it = lines.begin();
if (*it != RAW_FILE_FINGERPRINT) {
- throw MlxcfgException("Raw Content Fingerprint "RAW_FILE_FINGERPRINT" is missing or incorrect");
+ throw MlxcfgException("Raw Content Fingerprint " RAW_FILE_FINGERPRINT " is missing or incorrect");
}
it++;
throw MlxcfgException("No TLV configurations were found in the raw file");
}
- xmlTemplate += "</"XML_ROOT">";
+ xmlTemplate += "</" XML_ROOT ">";
//printf("xmlTemplate=\n%s", xmlTemplate.c_str());
}
// print usage examples
printf("\n");
printf(IDENT"Examples:\n");
- printf(IDENT2"%-35s: %s\n", "To query current configuration", MLXCFG_NAME" -d "MST_DEV_EXAMPLE" query");
- printf(IDENT2"%-35s: %s\n", "To set configuration", MLXCFG_NAME" -d "MST_DEV_EXAMPLE" set SRIOV_EN=1 NUM_OF_VFS=16 WOL_MAGIC_EN_P1=1");
- printf(IDENT2"%-35s: %s\n", "To set raw configuration", MLXCFG_NAME" -d "MST_DEV_EXAMPLE2" -f conf_file set_raw");
- printf(IDENT2"%-35s: %s\n", "To reset configuration", MLXCFG_NAME" -d "MST_DEV_EXAMPLE" reset");
+ printf(IDENT2"%-35s: %s\n", "To query current configuration", MLXCFG_NAME " -d " MST_DEV_EXAMPLE " query");
+ printf(IDENT2"%-35s: %s\n", "To set configuration", MLXCFG_NAME " -d " MST_DEV_EXAMPLE " set SRIOV_EN=1 NUM_OF_VFS=16 WOL_MAGIC_EN_P1=1");
+ printf(IDENT2"%-35s: %s\n", "To set raw configuration", MLXCFG_NAME " -d " MST_DEV_EXAMPLE2 " -f conf_file set_raw");
+ printf(IDENT2"%-35s: %s\n", "To reset configuration", MLXCFG_NAME " -d " MST_DEV_EXAMPLE " reset");
printf("\n");
printf(IDENT"Supported devices:\n");
printf(IDENT2"4th Generation devices: ConnectX3, ConnectX3-Pro (FW 2.31.5000 and above).\n");
}
// we parsed input until the set/query/reset cmd
if (i == argc && _mlxParams.cmd == Mc_Set) {
- return err(true, "missing configuration arguments. For more information please run "MLXCFG_NAME" -h|--help.");
+ return err(true, "missing configuration arguments. For more information please run " MLXCFG_NAME " -h|--help.");
}
if (i != argc && (_mlxParams.cmd == Mc_Reset || _mlxParams.cmd == Mc_Query)) {
return err(true, "%s command expects no argument but %d argument recieved", (_mlxParams.cmd == Mc_Reset) ? "reset" : "query", argc -i);
_mlxParams.NVOutputFile.c_str());
}
for (u_int32_t i = 0 ; i < content.size() * 4; i += 4) {
- fwrite(((u_int8_t*)content.data()) + i ,1 , 4 , file);
+ (void) fwrite(((u_int8_t*)content.data()) + i ,1 , 4 , file);
if (ferror(file)) {
fclose(file);
return err(true, "Write failed: %s.", strerror(errno));