Merge pull request #248 from ecraven/fix-warnings

Fixing two GCC warnings
This commit is contained in:
John Wiegley 2014-02-26 16:26:41 -06:00
commit ee36a33a19
2 changed files with 6 additions and 3 deletions

View file

@ -83,7 +83,10 @@ class ptristream : public std::istream
virtual pos_type seekoff(off_type off, ios_base::seekdir way,
ios_base::openmode)
{
switch (way) {
// cast to avoid gcc '-Wswitch' warning
// as ios_base::beg/cur/end are not necesssarily values of 'way' enum type ios_base::seekdir
// based on https://svn.boost.org/trac/boost/ticket/7644
switch (static_cast<int>(way)) {
case std::ios::cur:
setg(ptr, gptr()+off, ptr+len);
break;

View file

@ -69,8 +69,8 @@ namespace ledger {
namespace {
struct interval {
int first;
int last;
boost::uint32_t first;
boost::uint32_t last;
};
}