Disabled compiler warnings from icc.
This commit is contained in:
parent
8e20c378d6
commit
48b46a23b1
12 changed files with 23 additions and 18 deletions
|
|
@ -26,6 +26,8 @@ WARNFLAGS = -Wall -Wextra -Wfloat-equal -Wno-endif-labels
|
||||||
WARNFLAGS += -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion
|
WARNFLAGS += -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion
|
||||||
WARNFLAGS += -Wconversion -Wshorten-64-to-32 -Wsign-compare
|
WARNFLAGS += -Wconversion -Wshorten-64-to-32 -Wsign-compare
|
||||||
WARNFLAGS += -Wmissing-field-initializers -pedantic-errors
|
WARNFLAGS += -Wmissing-field-initializers -pedantic-errors
|
||||||
|
WARNFLAGS += -Weffc++ -Wstrict-null-sentinel -Wold-style-cast
|
||||||
|
WARNFLAGS += -Woverloaded-virtual -Wsign-promo
|
||||||
|
|
||||||
libledger_la_CPPFLAGS = -I$(top_builddir)/gdtoa -I$(srcdir)/gdtoa \
|
libledger_la_CPPFLAGS = -I$(top_builddir)/gdtoa -I$(srcdir)/gdtoa \
|
||||||
-I$(srcdir)/src #$(WARNFLAGS)
|
-I$(srcdir)/src #$(WARNFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,8 @@ AM_LFLAGS = -o $(LEX_OUTPUT_ROOT).c
|
||||||
WARNFLAGS = -Wall -Wextra -Wfloat-equal -Wno-endif-labels -Wcast-qual \
|
WARNFLAGS = -Wall -Wextra -Wfloat-equal -Wno-endif-labels -Wcast-qual \
|
||||||
-Wcast-align -Wwrite-strings -Wconversion -Wconversion \
|
-Wcast-align -Wwrite-strings -Wconversion -Wconversion \
|
||||||
-Wshorten-64-to-32 -Wsign-compare -Wmissing-field-initializers \
|
-Wshorten-64-to-32 -Wsign-compare -Wmissing-field-initializers \
|
||||||
-pedantic-errors
|
-pedantic-errors -Weffc++ -Wstrict-null-sentinel \
|
||||||
|
-Wold-style-cast -Woverloaded-virtual -Wsign-promo
|
||||||
libledger_la_CPPFLAGS = -I$(top_builddir)/gdtoa -I$(srcdir)/gdtoa \
|
libledger_la_CPPFLAGS = -I$(top_builddir)/gdtoa -I$(srcdir)/gdtoa \
|
||||||
-I$(srcdir)/src $(am__append_2) $(am__append_4) \
|
-I$(srcdir)/src $(am__append_2) $(am__append_4) \
|
||||||
$(am__append_6) $(am__append_8) $(am__append_9)
|
$(am__append_6) $(am__append_8) $(am__append_9)
|
||||||
|
|
|
||||||
|
|
@ -497,7 +497,6 @@ amount_t& amount_t::operator*=(const amount_t& amt)
|
||||||
mpz_mul(MPZ(quantity), MPZ(quantity), MPZ(amt.quantity));
|
mpz_mul(MPZ(quantity), MPZ(quantity), MPZ(amt.quantity));
|
||||||
quantity->prec += amt.quantity->prec;
|
quantity->prec += amt.quantity->prec;
|
||||||
|
|
||||||
finish:
|
|
||||||
if (! has_commodity())
|
if (! has_commodity())
|
||||||
commodity_ = amt.commodity_;
|
commodity_ = amt.commodity_;
|
||||||
|
|
||||||
|
|
@ -547,7 +546,6 @@ amount_t& amount_t::operator/=(const amount_t& amt)
|
||||||
mpz_round(MPZ(quantity), MPZ(quantity), quantity->prec, quantity->prec - 1);
|
mpz_round(MPZ(quantity), MPZ(quantity), quantity->prec, quantity->prec - 1);
|
||||||
quantity->prec -= 1;
|
quantity->prec -= 1;
|
||||||
|
|
||||||
finish:
|
|
||||||
if (! has_commodity())
|
if (! has_commodity())
|
||||||
commodity_ = amt.commodity_;
|
commodity_ = amt.commodity_;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ class ofx_parser_t : public parser_t
|
||||||
public:
|
public:
|
||||||
virtual bool test(std::istream& in) const;
|
virtual bool test(std::istream& in) const;
|
||||||
|
|
||||||
virtual unsigned int parse(std::istream& in,
|
virtual unsigned int parse(std::istream& in,
|
||||||
journal_t * journal,
|
journal_t * journal,
|
||||||
account_t * master = NULL,
|
account_t * master = NULL,
|
||||||
const string * original_file = NULL);
|
const optional<path>& original = optional<path>());
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,6 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
|
||||||
}
|
}
|
||||||
|
|
||||||
// --long-option or -s
|
// --long-option or -s
|
||||||
again:
|
|
||||||
if ((*i)[1] == '-') {
|
if ((*i)[1] == '-') {
|
||||||
if ((*i)[2] == '\0')
|
if ((*i)[2] == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
@ -241,9 +240,6 @@ void process_arguments(int argc, char ** argv, const bool anywhere,
|
||||||
checked_delete(*o);
|
checked_delete(*o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next:
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@ quotes_by_script::operator()(commodity_t& commodity,
|
||||||
"Failed to download price for '" << commodity.symbol() <<
|
"Failed to download price for '" << commodity.symbol() <<
|
||||||
"' (command: \"getquote " << commodity.base_symbol() << "\")");
|
"' (command: \"getquote " << commodity.base_symbol() << "\")");
|
||||||
}
|
}
|
||||||
|
return optional<amount_t>();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ledger
|
} // namespace ledger
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ class session_t : public xml::xpath_t::scope_t
|
||||||
account_t * master = NULL,
|
account_t * master = NULL,
|
||||||
const optional<path>& original = optional<path>());
|
const optional<path>& original = optional<path>());
|
||||||
|
|
||||||
unsigned int read_journal(const path& path,
|
unsigned int read_journal(const path& pathname,
|
||||||
journal_t * journal,
|
journal_t * journal,
|
||||||
account_t * master = NULL,
|
account_t * master = NULL,
|
||||||
const optional<path>& original = optional<path>());
|
const optional<path>& original = optional<path>());
|
||||||
|
|
|
||||||
|
|
@ -454,10 +454,8 @@ static inline void stream_memory_size(std::ostream& out, std::size_t size)
|
||||||
out << (double(size) / 1024.0) << 'K';
|
out << (double(size) / 1024.0) << 'K';
|
||||||
else if (size < (1024 * 1024 * 1024))
|
else if (size < (1024 * 1024 * 1024))
|
||||||
out << (double(size) / (1024.0 * 1024.0)) << 'M';
|
out << (double(size) / (1024.0 * 1024.0)) << 'M';
|
||||||
else if (size < (1024 * 1024 * 1024 * 1024))
|
|
||||||
out << (double(size) / (1024.0 * 1024.0 * 1024.0)) << 'G';
|
|
||||||
else
|
else
|
||||||
assert(false);
|
out << (double(size) / (1024.0 * 1024.0 * 1024.0)) << 'G';
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool logger_has_run = false;
|
static bool logger_has_run = false;
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,9 @@ namespace ledger {
|
||||||
typedef gregorian::date_duration date_duration;
|
typedef gregorian::date_duration date_duration;
|
||||||
typedef posix_time::seconds seconds;
|
typedef posix_time::seconds seconds;
|
||||||
|
|
||||||
typedef filesystem::path path;
|
typedef boost::filesystem::path path;
|
||||||
typedef boost::filesystem::ifstream ifstream;
|
typedef boost::filesystem::ifstream ifstream;
|
||||||
typedef boost::filesystem::ofstream ofstream;
|
typedef boost::filesystem::ofstream ofstream;
|
||||||
typedef boost::filesystem::filesystem_error filesystem_error;
|
typedef boost::filesystem::filesystem_error filesystem_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -392,6 +392,7 @@ value_t& value_t::operator+=(const value_t& val)
|
||||||
|
|
||||||
throw_(value_error,
|
throw_(value_error,
|
||||||
"Cannot add " << label() << " to " << val.label());
|
"Cannot add " << label() << " to " << val.label());
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_t& value_t::operator-=(const value_t& val)
|
value_t& value_t::operator-=(const value_t& val)
|
||||||
|
|
@ -541,6 +542,7 @@ value_t& value_t::operator-=(const value_t& val)
|
||||||
|
|
||||||
throw_(value_error,
|
throw_(value_error,
|
||||||
"Cannot subtract " << label() << " from " << val.label());
|
"Cannot subtract " << label() << " from " << val.label());
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_t& value_t::operator*=(const value_t& val)
|
value_t& value_t::operator*=(const value_t& val)
|
||||||
|
|
@ -626,6 +628,7 @@ value_t& value_t::operator*=(const value_t& val)
|
||||||
|
|
||||||
throw_(value_error,
|
throw_(value_error,
|
||||||
"Cannot multiply " << label() << " with " << val.label());
|
"Cannot multiply " << label() << " with " << val.label());
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_t& value_t::operator/=(const value_t& val)
|
value_t& value_t::operator/=(const value_t& val)
|
||||||
|
|
@ -695,6 +698,7 @@ value_t& value_t::operator/=(const value_t& val)
|
||||||
|
|
||||||
throw_(value_error,
|
throw_(value_error,
|
||||||
"Cannot divide " << label() << " by " << val.label());
|
"Cannot divide " << label() << " by " << val.label());
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1228,6 +1232,7 @@ value_t value_t::value(const optional<moment_t>& moment) const
|
||||||
}
|
}
|
||||||
|
|
||||||
throw_(value_error, "Cannot find the value of " << label());
|
throw_(value_error, "Cannot find the value of " << label());
|
||||||
|
return value_t();
|
||||||
}
|
}
|
||||||
|
|
||||||
void value_t::in_place_reduce()
|
void value_t::in_place_reduce()
|
||||||
|
|
@ -1269,6 +1274,7 @@ value_t value_t::round() const
|
||||||
}
|
}
|
||||||
|
|
||||||
throw_(value_error, "Cannot round " << label());
|
throw_(value_error, "Cannot round " << label());
|
||||||
|
return value_t();
|
||||||
}
|
}
|
||||||
|
|
||||||
value_t value_t::unround() const
|
value_t value_t::unround() const
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,8 @@ class value_t
|
||||||
assert(false);
|
assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
assert(false);
|
||||||
|
return "<invalid>";
|
||||||
}
|
}
|
||||||
|
|
||||||
operator bool() const;
|
operator bool() const;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ public:
|
||||||
|
|
||||||
virtual value_t to_value() const {
|
virtual value_t to_value() const {
|
||||||
throw_(conversion_error, "Cannot convert node to a value");
|
throw_(conversion_error, "Cannot convert node to a value");
|
||||||
|
return value_t();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void print(std::ostream& out, int depth = 0) const = 0;
|
virtual void print(std::ostream& out, int depth = 0) const = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue