diff options
author | John Wiegley <johnw@newartisans.com> | 2014-02-26 16:26:41 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-02-26 16:26:41 -0600 |
commit | ee36a33a19c57cd57c1be7076530d65ae1ac68b0 (patch) | |
tree | d45bfb55f187a2d53362d92c65d14d04ee0016ed /src | |
parent | eddd03ed096fc97a9b4f252ebbef0dae84410240 (diff) | |
parent | 7bcc5b7c2cd057c60d4e25314e675ac3f7b3be46 (diff) | |
download | fork-ledger-ee36a33a19c57cd57c1be7076530d65ae1ac68b0.tar.gz fork-ledger-ee36a33a19c57cd57c1be7076530d65ae1ac68b0.tar.bz2 fork-ledger-ee36a33a19c57cd57c1be7076530d65ae1ac68b0.zip |
Merge pull request #248 from ecraven/fix-warnings
Fixing two GCC warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/pstream.h | 5 | ||||
-rw-r--r-- | src/wcwidth.cc | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/pstream.h b/src/pstream.h index bcbf6755..ed314068 100644 --- a/src/pstream.h +++ b/src/pstream.h @@ -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; diff --git a/src/wcwidth.cc b/src/wcwidth.cc index 71eaf6d6..c23f83d7 100644 --- a/src/wcwidth.cc +++ b/src/wcwidth.cc @@ -69,8 +69,8 @@ namespace ledger { namespace { struct interval { - int first; - int last; + boost::uint32_t first; + boost::uint32_t last; }; } |