Commit ab7ab90a authored by Pavel Vainerman's avatar Pavel Vainerman

(coverity scan): Работа над исправлением ошибок,

заодно исключил -Wctor-dtor-privacy
parent 41587a59
......@@ -13,10 +13,10 @@ GENERATED=TestGen_SK.h TestGen_SK.cc TestGen-main.cc
GENERATED2=TestGenAlone_SK.h TestGenAlone_SK.cc TestGenAlone-main.cc
GENUOBJ=UObject_SK.cc UObject_SK.h
TestGen_SK.cc TestGen_SK.h: ../@PACKAGE@-codegen testgen.src.xml ../*.xsl
TestGen-main.cc TestGen_SK.cc TestGen_SK.h: ../@PACKAGE@-codegen testgen.src.xml ../*.xsl
../@PACKAGE@-codegen -l $(top_builddir)/Utilities/codegen --local-include -n TestGen testgen.src.xml
TestGenAlone_SK.cc TestGenAlone_SK.h: ../@PACKAGE@-codegen testgen-alone.src.xml ../*.xsl
TestGenAlone-main.cc TestGenAlone_SK.cc TestGenAlone_SK.h: ../@PACKAGE@-codegen testgen-alone.src.xml ../*.xsl
../@PACKAGE@-codegen -l $(top_builddir)/Utilities/codegen --local-include --alone -n TestGenAlone testgen-alone.src.xml
$(GENUOBJ): ../@PACKAGE@-codegen uobject.src.xml ../*.xsl
......
......@@ -277,8 +277,8 @@ AC_SUBST(COV_CFLAGS)
AM_CONDITIONAL(HAVE_COVERAGE, test ${buildgcov} = true)
AM_CONDITIONAL(HAVE_TESTS, test ${buildtests} = true)
# -Weffc++ -Wno-unused-variable -Werror
CXX_EXTRA_FLAGS="-Wnon-virtual-dtor -Wctor-dtor-privacy -Woverloaded-virtual -Woverflow"
# -Weffc++ -Wno-unused-variable -Werror -Wctor-dtor-privacy
CXX_EXTRA_FLAGS="-Wnon-virtual-dtor -Woverloaded-virtual -Woverflow"
# export
LDFLAGS="$LDFLAGS ${OMNI_LIBS} ${XML_LIBS} ${SIGC_LIBS} ${COV_LIBS} ${COMCPP_LIBS}"
......
......@@ -612,21 +612,30 @@ namespace MTR
}
std::ostream& operator<<(std::ostream& os, MTR::T8& t )
{
return os << setfill('0') << hex
std::ios_base::fmtflags old_flags = os.flags();
os << setfill('0') << hex
<< setw(2) << t.hour() << ":" << setw(2) << t.min()
<< " " << setw(2) << t.day() << "/" << setw(2) << t.mon();
os.setf(old_flags);
return os;
}
std::ostream& operator<<(std::ostream& os, MTR::T9& t )
{
return os << setfill('0') << hex
std::ios_base::fmtflags old_flags = os.flags();
os << setfill('0') << hex
<< setw(2) << t.hour() << ":" << setw(2) << t.min()
<< ":" << setw(2) << t.sec() << "." << setw(2) << t.ssec();
os.setf(old_flags);
return os;
}
std::ostream& operator<<(std::ostream& os, MTR::T10& t )
{
return os << setfill('0') << dec
std::ios_base::fmtflags old_flags = os.flags();
os << setfill('0') << dec
<< setw(4) << t.year() << "/" << setw(2) << t.mon()
<< "/" << setw(2) << t.day();
os.setf(old_flags);
return os;
}
std::ostream& operator<<(std::ostream& os, MTR::T16& t )
{
......
......@@ -167,11 +167,13 @@ end_private(false)
resetMsgTime = uni_atoi(init3_str(conf->getArgParam("--" + argprefix + "resetMsgTime"),conf->getProp(cnode,"resetMsgTime"),s_resetTime));
ptResetMsg.setTiming(resetMsgTime);
smReadyTimeout = conf->getArgInt("--" + argprefix + "sm-ready-timeout","");
if( smReadyTimeout == 0 )
int sm_tout = conf->getArgInt("--" + argprefix + "sm-ready-timeout","");
if( sm_tout == 0 )
smReadyTimeout = 60000;
else if( smReadyTimeout < 0 )
else if( sm_tout < 0 )
smReadyTimeout = UniSetTimer::WaitUpTime;
else
smReadyTimeout = sm_tout;
smTestID = conf->getSensorID(init3_str(conf->getArgParam("--" + argprefix + "sm-test-id"),conf->getProp(cnode,"smTestID"),""));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment