gnucash master: Revert "Some type mismatch fixes to make it build with clang in MacOSX Mavericks."
Mike Alexander
mta at code.gnucash.org
Thu Dec 11 17:26:05 EST 2014
Updated via https://github.com/Gnucash/gnucash/commit/735ee38b (commit)
from https://github.com/Gnucash/gnucash/commit/f4168e10 (commit)
commit 735ee38b650c203472ef37dc28f4c3613d6fda2d
Author: Mike Alexander <mta at umich.edu>
Date: Thu Dec 11 17:24:48 2014 -0500
Revert "Some type mismatch fixes to make it build with clang in MacOSX Mavericks."
This reverts commit 78fea12afc5f0db5a137d0766e92994232f60a78.
diff --git a/src/engine/test-core/test-engine-stuff.c b/src/engine/test-core/test-engine-stuff.c
index 39196ac..08f9963 100644
--- a/src/engine/test-core/test-engine-stuff.c
+++ b/src/engine/test-core/test-engine-stuff.c
@@ -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);
diff --git a/src/libqof/qof/gnc-int128.hpp b/src/libqof/qof/gnc-int128.hpp
index 522cf79..47cf69a 100644
--- a/src/libqof/qof/gnc-int128.hpp
+++ b/src/libqof/qof/gnc-int128.hpp
@@ -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);
/**
diff --git a/src/libqof/qof/gnc-numeric.cpp b/src/libqof/qof/gnc-numeric.cpp
index 785dd9c..94c0bd3 100644
--- a/src/libqof/qof/gnc-numeric.cpp
+++ b/src/libqof/qof/gnc-numeric.cpp
@@ -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);
diff --git a/src/libqof/qof/kvp_frame.cpp b/src/libqof/qof/kvp_frame.cpp
index 9df4437..4ba546e 100644
--- a/src/libqof/qof/kvp_frame.cpp
+++ b/src/libqof/qof/kvp_frame.cpp
@@ -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 {};
Summary of changes:
src/engine/test-core/test-engine-stuff.c | 12 ++++++------
src/libqof/qof/gnc-int128.hpp | 2 --
src/libqof/qof/gnc-numeric.cpp | 2 +-
src/libqof/qof/kvp_frame.cpp | 6 +++---
4 files changed, 10 insertions(+), 12 deletions(-)
More information about the gnucash-changes
mailing list