handle lacking return value handling caught by coverity
This commit is contained in:
parent
f31e04ec6c
commit
4bc28d547b
3 changed files with 10 additions and 3 deletions
|
@ -900,7 +900,10 @@ int main( int argc, char** argv)
|
|||
}
|
||||
|
||||
{
|
||||
mapnik::freetype_engine::register_fonts("./fonts", true);
|
||||
bool success = mapnik::freetype_engine::register_fonts("./fonts", true);
|
||||
if (!success) {
|
||||
std::clog << "warning, did not register any new fonts!\n";
|
||||
}
|
||||
unsigned face_count = mapnik::freetype_engine::face_names().size();
|
||||
test13 runner(1000,10);
|
||||
benchmark(runner, (boost::format("font_engihe: created %ld faces in ") % (face_count * 1000 * 10)).str());
|
||||
|
|
|
@ -54,7 +54,8 @@ boost::ptr_vector<mapnik::geometry_type> const& (mapnik::feature_impl::*get_path
|
|||
|
||||
void feature_add_geometries_from_wkb(mapnik::feature_impl &feature, std::string wkb)
|
||||
{
|
||||
geometry_utils::from_wkb(feature.paths(), wkb.c_str(), wkb.size());
|
||||
bool result = geometry_utils::from_wkb(feature.paths(), wkb.c_str(), wkb.size());
|
||||
if (!result) throw std::runtime_error("Failed to parse WKB");
|
||||
}
|
||||
|
||||
void feature_add_geometries_from_wkt(mapnik::feature_impl &feature, std::string wkt)
|
||||
|
|
|
@ -212,7 +212,10 @@ void pgsql2sqlite(Connection conn,
|
|||
|
||||
if ( rs->next())
|
||||
{
|
||||
mapnik::util::string2int(rs->getValue("srid"),srid);
|
||||
if (!mapnik::util::string2int(rs->getValue("srid"),srid))
|
||||
{
|
||||
std::clog << "could not convert srid to integer\n";
|
||||
}
|
||||
geom_col = rs->getValue("f_geometry_column");
|
||||
geom_type = rs->getValue("type");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue