Cured several harmless compiler warnings
This commit is contained in:
parent
2d63c9364a
commit
9d4e888ef5
6 changed files with 12 additions and 4 deletions
|
|
@ -402,10 +402,12 @@ commodity_t::exchange(const amount_t& amount,
|
|||
{
|
||||
DEBUG("commodity.prices.add", "exchange: " << amount << " for " << cost);
|
||||
DEBUG("commodity.prices.add", "exchange: is-per-unit = " << is_per_unit);
|
||||
#if defined(DEBUG_ON)
|
||||
if (moment)
|
||||
DEBUG("commodity.prices.add", "exchange: moment = " << *moment);
|
||||
if (tag)
|
||||
DEBUG("commodity.prices.add", "exchange: tag = " << *tag);
|
||||
#endif
|
||||
|
||||
commodity_t& commodity(amount.commodity());
|
||||
|
||||
|
|
|
|||
|
|
@ -360,7 +360,8 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
|
|||
result = truncate(temp, elem->max_width);
|
||||
} else {
|
||||
result = temp.extract();
|
||||
for (int i = 0; i < (int)elem->min_width - (int)temp.length(); i++)
|
||||
for (int i = 0; i < (static_cast<int>(elem->min_width) -
|
||||
static_cast<int>(temp.length())); i++)
|
||||
result += " ";
|
||||
}
|
||||
out_str << result;
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ void global_scope_t::visit_man_page() const
|
|||
throw std::logic_error(_("Failed to fork child process"));
|
||||
}
|
||||
else if (pid == 0) { // child
|
||||
execlp("man", "man", "1", "ledger", (char *)0);
|
||||
execlp("man", "man", "1", "ledger", NULL);
|
||||
|
||||
// We should never, ever reach here
|
||||
perror("execlp: man");
|
||||
|
|
|
|||
|
|
@ -43,12 +43,14 @@ bool item_t::has_tag(const string& tag) const
|
|||
return false;
|
||||
}
|
||||
string_map::const_iterator i = metadata->find(tag);
|
||||
#if defined(DEBUG_ON)
|
||||
if (SHOW_DEBUG("item.meta")) {
|
||||
if (i == metadata->end())
|
||||
DEBUG("item.meta", "Item does not have this tag");
|
||||
else
|
||||
DEBUG("item.meta", "Item has the tag!");
|
||||
}
|
||||
#endif
|
||||
return i != metadata->end();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,8 +90,7 @@ namespace {
|
|||
#else
|
||||
path basename(pager_path.leaf());
|
||||
#endif
|
||||
execlp(pager_path.string().c_str(), basename.string().c_str(),
|
||||
(char *)0);
|
||||
execlp(pager_path.string().c_str(), basename.string().c_str(), NULL);
|
||||
|
||||
// We should never, ever reach here
|
||||
perror((std::string("execlp: ") + pager_path.string()).c_str());
|
||||
|
|
|
|||
|
|
@ -431,8 +431,10 @@ void auto_xact_t::extend_xact(xact_base_t& xact, bool post_handler)
|
|||
<< "amount " << initial_post->amount << " (precision "
|
||||
<< initial_post->amount.precision() << ")");
|
||||
|
||||
#if defined(DEBUG_ON)
|
||||
if (initial_post->amount.keep_precision())
|
||||
DEBUG("xact.extend", " precision is kept");
|
||||
#endif
|
||||
|
||||
DEBUG("xact.extend",
|
||||
"Posting on line " << post->beg_line << ": "
|
||||
|
|
@ -440,10 +442,12 @@ void auto_xact_t::extend_xact(xact_base_t& xact, bool post_handler)
|
|||
<< " (precision " << post->amount.precision()
|
||||
<< " != " << amt.precision() << ")");
|
||||
|
||||
#if defined(DEBUG_ON)
|
||||
if (post->amount.keep_precision())
|
||||
DEBUG("xact.extend", " precision is kept");
|
||||
if (amt.keep_precision())
|
||||
DEBUG("xact.extend", " amt precision is kept");
|
||||
#endif
|
||||
}
|
||||
|
||||
account_t * account = post->account;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue