Warning fixes

This commit is contained in:
Alex Zolotarev 2014-03-18 16:11:55 +03:00 committed by Alex Zolotarev
parent 2f98749ea8
commit 86ffb62add
8 changed files with 22 additions and 10 deletions

View file

@ -9,6 +9,10 @@
UNIT_TEST(Assert_Smoke)
{
int x = 5;
// to avoid warning in release
#ifdef RELEASE
UNUSED_VALUE(x);
#endif
ASSERT_EQUAL ( x, 5, () );
ASSERT_NOT_EQUAL ( x, 6, () );
//ASSERT_EQUAL ( x, 666, ("Skip this to continue test") );

View file

@ -44,7 +44,10 @@ inline string NumToHex(IntT n)
for (size_t i = 0; i < sizeof(n); ++i)
{
buf[i] = (n >> ((sizeof(n) - 1) * 8));
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshift-count-overflow"
n <<= 8;
#pragma GCC diagnostic pop
}
return ToHex(buf, sizeof(buf));

View file

@ -21,11 +21,11 @@ namespace
features[indexes[i]].m_isOwner = true;
}
void ResetReadedMark(vector<df::FeatureInfo> & features)
{
for (size_t i = 0; i < features.size(); ++i)
features[i].m_isOwner = false;
}
// void ResetReadedMark(vector<df::FeatureInfo> & features)
// {
// for (size_t i = 0; i < features.size(); ++i)
// features[i].m_isOwner = false;
// }
}
UNIT_TEST(MemoryFeatureIndex_SimpleTest)

View file

@ -114,6 +114,6 @@ void DrapeSurface::sizeChanged(int)
m2::PointF DrapeSurface::GetDevicePosition(const QPoint & p)
{
qreal ratio = devicePixelRatio();
// qreal ratio = devicePixelRatio();
return m2::PointF(p.x() /* ratio*/, p.y() /* ratio*/);
}

View file

@ -172,6 +172,10 @@ namespace ftype
ASSERT ( value <= max_value, ("invalid input value", value) );
uint8_t const cl = get_control_level(type);
// to avoid warning in release
#ifdef RELEASE
UNUSED_VALUE(levels_count);
#endif
ASSERT ( cl < levels_count, (cl) );
set_value(type, cl, value);

View file

@ -132,6 +132,7 @@ void FeatureParams::SetGeomType(feature::EGeomType t)
case GEOM_POINT: m_geomType = HEADER_GEOM_POINT; break;
case GEOM_LINE: m_geomType = HEADER_GEOM_LINE; break;
case GEOM_AREA: m_geomType = HEADER_GEOM_AREA; break;
default: ASSERT(false, ());
}
}

View file

@ -8,7 +8,7 @@ namespace stats
{
EventWriter::EventWriter(string const & uniqueClientId, string const & dbPath)
: m_cnt(0), m_db(0), m_path(dbPath), m_uid(0)
: /*m_cnt(0), m_db(0), */m_path(dbPath)/*, m_uid(0)*/
{
}

View file

@ -27,10 +27,10 @@ private:
bool OpenDb(string const & path);
private:
unsigned int m_cnt;
void * m_db; // @todo Replace with ours impl
// unsigned int m_cnt;
// void * m_db; // @todo Replace with ours impl
string m_path;
unsigned long long m_uid;
// unsigned long long m_uid;
};
} // namespace stats