mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Revert "Some type mismatch fixes to make it build with clang in MacOSX Mavericks."
This reverts commit 78fea12afc
.
This commit is contained in:
parent
f4168e108b
commit
735ee38b65
@ -457,7 +457,7 @@ get_random_gnc_numeric(int64_t deno)
|
||||
numer = limit;
|
||||
}
|
||||
if (0 == numer) numer = 1;
|
||||
g_log("test.engine.suff", G_LOG_LEVEL_INFO, "New GncNumeric %" G_GINT64_FORMAT " / %" PRId64 " !\n", numer, deno);
|
||||
g_log("test.engine.suff", G_LOG_LEVEL_INFO, "New GncNumeric %" PRIu64 " / %" PRIu64 " !\n", numer, deno);
|
||||
return gnc_numeric_create(numer, deno);
|
||||
}
|
||||
|
||||
@ -944,8 +944,8 @@ add_random_splits(QofBook *book, Transaction *trn, GList *account_list)
|
||||
if (do_bork())
|
||||
{
|
||||
val = get_random_gnc_numeric(GNC_DENOM_AUTO);
|
||||
g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Borking second %" G_GINT64_FORMAT
|
||||
" / %" G_GINT64_FORMAT ", scu %d\n", val.num, val.denom, s2_scu);
|
||||
g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Borking second %" PRIu64
|
||||
" / %" PRIu64 ", scu %d\n", val.num, val.denom, s2_scu);
|
||||
}
|
||||
val = gnc_numeric_neg(val);
|
||||
xaccSplitSetValue(s2, val);
|
||||
@ -1310,7 +1310,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
|
||||
{
|
||||
int64_t new_num = val.num / (val.denom / scu);
|
||||
g_log("test.engine.suff", G_LOG_LEVEL_DEBUG,
|
||||
"Adjusting val.denom from %" G_GINT64_FORMAT " to %" PRId64 "\n",
|
||||
"Adjusting val.denom from %" PRIu64 " to %" PRIu64 "\n",
|
||||
val.num, new_num);
|
||||
val.num = new_num;
|
||||
}
|
||||
@ -1319,7 +1319,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
|
||||
}
|
||||
while (gnc_numeric_check(val) != GNC_ERROR_OK);
|
||||
g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG,
|
||||
"Random split value: %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT ", scu %d\n",
|
||||
"Random split value: %" PRIu64 " / %" PRIu64 ", scu %d\n",
|
||||
val.num, val.denom, scu);
|
||||
xaccSplitSetValue(ret, val);
|
||||
|
||||
@ -1343,7 +1343,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
|
||||
while (gnc_numeric_check(amt) != GNC_ERROR_OK);
|
||||
}
|
||||
g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Random split amount: %"
|
||||
G_GINT64_FORMAT " / %" G_GINT64_FORMAT ", rate %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "\n",
|
||||
PRIu64 " / %" PRIu64 ", rate %" PRIu64 " / %" PRIu64 "\n",
|
||||
amt.num, amt.denom, rate.num, rate.denom);
|
||||
|
||||
|
||||
|
@ -33,7 +33,6 @@ extern "C"
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#include <glib.h>
|
||||
}
|
||||
|
||||
#include <stdexcept>
|
||||
@ -77,7 +76,6 @@ enum // Values for m_flags
|
||||
GncInt128 (uint16_t lower) : GncInt128{static_cast<uint64_t>(lower)} {};
|
||||
GncInt128 (int32_t lower) : GncInt128{static_cast<int64_t>(lower)} {};
|
||||
GncInt128 (uint32_t lower) : GncInt128{static_cast<uint64_t>(lower)} {};
|
||||
GncInt128 (gint64 lower) : GncInt128{static_cast<int64_t>(lower)} {};
|
||||
GncInt128 (int64_t lower);
|
||||
GncInt128 (uint64_t lower);
|
||||
/**
|
||||
|
@ -346,7 +346,7 @@ gnc_numeric_abs(gnc_numeric a)
|
||||
********************************************************************/
|
||||
|
||||
gnc_numeric
|
||||
gnc_numeric_convert(gnc_numeric in, gint64 denom, int how)
|
||||
gnc_numeric_convert(gnc_numeric in, int64_t denom, int how)
|
||||
{
|
||||
GncNumeric a (in), b (gnc_numeric_zero());
|
||||
GncDenom d (a, b, denom, how);
|
||||
|
@ -921,9 +921,9 @@ kvp_glist_compare(const GList * list1, const GList * list2)
|
||||
********************************************************************/
|
||||
|
||||
KvpValue *
|
||||
kvp_value_new_gint64(gint64 value)
|
||||
kvp_value_new_gint64(int64_t value)
|
||||
{
|
||||
return new KvpValueImpl{static_cast<int64_t>(value)};
|
||||
return new KvpValueImpl{value};
|
||||
}
|
||||
|
||||
KvpValue *
|
||||
@ -1008,7 +1008,7 @@ kvp_value_get_type(const KvpValue * oldval)
|
||||
return value->get_type();
|
||||
}
|
||||
|
||||
gint64
|
||||
int64_t
|
||||
kvp_value_get_gint64(const KvpValue * ovalue)
|
||||
{
|
||||
if (!ovalue) return {};
|
||||
|
Loading…
Reference in New Issue
Block a user