From 2aff35215fbe24459aa4057d5b31ea7490046ca6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 30 Jul 2008 05:12:46 -0400 Subject: 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. --- binary.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'binary.cc') diff --git a/binary.cc b/binary.cc index 85b1111c..b9ec7142 100644 --- a/binary.cc +++ b/binary.cc @@ -560,7 +560,7 @@ void write_amount(std::ostream& out, const amount_t& amt) void write_value(std::ostream& out, const value_t& val) { - write_long(out, (int)val.type()); + write_long(out, static_cast(val.type())); switch (val.type()) { case value_t::BOOLEAN: @@ -877,12 +877,12 @@ unsigned int journal_t::read(std::istream& in, char * item_pool = new char[pool_size]; - item_pool = item_pool; + item_pool = item_pool; item_pool_end = item_pool + pool_size; - entry_t * entry_pool = (entry_t *) item_pool; - xact_t * xact_pool = (xact_t *) (item_pool + - sizeof(entry_t) * count); + entry_t * entry_pool = reinterpret_cast(item_pool); + xact_t * xact_pool = reinterpret_cast(item_pool + + (sizeof(entry_t) * count)); bigints_index = 0; bigints = bigints_next = (item_pool + sizeof(entry_t) * count + sizeof(xact_t) * xact_count); @@ -1153,8 +1153,8 @@ void journal_t::write(std::ostream& out) // Back-patch the count for amounts - unsigned long data_size = (((unsigned long) out.tellp()) - - ((unsigned long) data_val) - + unsigned long data_size = (static_cast(out.tellp()) - + static_cast(data_val) - sizeof(unsigned long)); out.seekp(data_val); write_number(out, data_size); -- cgit v1.2.3