summaryrefslogtreecommitdiff
path: root/token.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-30 05:12:46 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-30 05:12:46 -0400
commit2aff35215fbe24459aa4057d5b31ea7490046ca6 (patch)
tree6a79a3d84e352e3b3647484b0daf38b1ae6aa81f /token.cc
parent230d7fd6027d05422f4bb26e9bfb3758a9cb16ea (diff)
downloadfork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.gz
fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.bz2
fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.zip
Enabled a huge number of warning flags for g++ in acprep, and fixed them all
except for several unused parameter warnings (because there is so much code still #if 0'd out), and one implicit conversion from long long to long which still has to be dealt with.
Diffstat (limited to 'token.cc')
-rw-r--r--token.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/token.cc b/token.cc
index 3d5eeb21..adc7069f 100644
--- a/token.cc
+++ b/token.cc
@@ -331,7 +331,7 @@ void expr_t::token_t::next(std::istream& in, const unsigned int pflags)
// When in relaxed parsing mode, we want to migrate commodity
// flags so that any precision specified by the user updates the
// current maximum displayed precision.
- pos = (long)in.tellg();
+ pos = static_cast<unsigned long>(in.tellg());
amount_t::flags_t parse_flags = 0;
if (pflags & EXPR_PARSE_NO_MIGRATE)
@@ -381,7 +381,7 @@ void expr_t::token_t::unexpected()
void expr_t::token_t::unexpected(char c, char wanted)
{
- if ((unsigned char) c == 0xff) {
+ if (static_cast<unsigned char>(c) == 0xff) {
if (wanted)
throw_(parse_error, "Missing '" << wanted << "'");
else