gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sat Jan 17 15:27:22 EST 2015
Updated via https://github.com/Gnucash/gnucash/commit/3d925821 (commit)
via https://github.com/Gnucash/gnucash/commit/f20140b7 (commit)
from https://github.com/Gnucash/gnucash/commit/7b5ae715 (commit)
commit 3d9258216e221ab1f38f7af6c293da8fda6bba9f
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Jan 17 13:19:11 2015 -0800
Restore nodist_test_kvp_value_SOURCES inadvertently removed in 97a689a.
diff --git a/src/libqof/qof/test/Makefile.am b/src/libqof/qof/test/Makefile.am
index 26d5150..2f8425b 100644
--- a/src/libqof/qof/test/Makefile.am
+++ b/src/libqof/qof/test/Makefile.am
@@ -40,6 +40,9 @@ test_kvp_value_SOURCES = \
test-kvp-value.cpp \
test-kvp-frame.cpp
+nodist_test_kvp_value_SOURCES = \
+ ${GTEST_ROOT}/src/gtest_main.cc
+
test_kvp_value_LDADD = \
$(top_builddir)/$(MODULEPATH)/libgnc-qof.la \
$(top_builddir)/src/test-core/libgtest.a \
commit f20140b774374f65ac6a537e68a9a1ea445740f4
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Jan 17 12:51:26 2015 -0800
Fix __func__ workaround for Clang 3.5.
So that make check works correctly; also affects Xcode 6, as Apple
Clang 6 is based on normal Clang 3.5.
diff --git a/src/app-utils/guile-util.c b/src/app-utils/guile-util.c
index dab9e3b..91e8170 100644
--- a/src/app-utils/guile-util.c
+++ b/src/app-utils/guile-util.c
@@ -308,7 +308,7 @@ gnc_split_scm_set_account(SCM split_scm, Account *account)
return;
guid_to_string_buff(xaccAccountGetGUID(account), guid_string);
- if (guid_string == NULL)
+ if (strlen(guid_string) == 0)
return;
arg = scm_from_utf8_string(guid_string);
diff --git a/src/engine/test/utest-Account.c b/src/engine/test/utest-Account.c
index 1dcc672..ea7f74d 100644
--- a/src/engine/test/utest-Account.c
+++ b/src/engine/test/utest-Account.c
@@ -38,7 +38,9 @@
#else
#define _Q "`"
#endif
-
+#if defined(__clang__) && (__clang_major__ == 5 || (__clang_major__ == 3 && __clang_minor__ < 5))
+#define USE_CLANG_FUNC_SIG 1
+#endif
static const gchar *suitename = "/engine/Account";
void test_suite_account (void);
@@ -463,7 +465,7 @@ test_gnc_account_list_name_violations (Fixture *fixture, gconstpointer pData)
{
guint log_level = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
gchar *log_domain = "gnc.engine";
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "GList *gnc_account_list_name_violations(QofBook *, const gchar *)"
#else
#define _func "gnc_account_list_name_violations"
@@ -750,7 +752,7 @@ test_xaccCloneAccount (Fixture *fixture, gconstpointer pData)
Account *clone;
QofBook *book = gnc_account_get_book (fixture->acct);
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "Account *xaccCloneAccount(const Account *, QofBook *)"
#else
#define _func "xaccCloneAccount"
@@ -853,7 +855,7 @@ test_xaccFreeAccount (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@@ -967,7 +969,7 @@ test_xaccAccountCommitEdit (Fixture *fixture, gconstpointer pData)
{
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
#else
#define _func "xaccTransGetSplitIndex"
@@ -1084,7 +1086,7 @@ test_gnc_account_insert_remove_split (Fixture *fixture, gconstpointer pData)
Split *split3 = xaccMallocSplit (book);
TestSignal sig1, sig2, sig3;
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "gboolean gnc_account_insert_split(Account *, Split *)"
#else
#define _func "gnc_account_insert_split"
diff --git a/src/engine/test/utest-Split.cpp b/src/engine/test/utest-Split.cpp
index 0636332..4e3425d 100644
--- a/src/engine/test/utest-Split.cpp
+++ b/src/engine/test/utest-Split.cpp
@@ -45,6 +45,9 @@ extern "C"
#else
#define _Q "`"
#endif
+#if defined(__clang__) && (__clang_major__ == 5 || (__clang_major__ == 3 && __clang_minor__ < 5))
+#define USE_CLANG_FUNC_SIG 1
+#endif
static const gchar *suitename = "/engine/Split";
void test_suite_split ( void );
@@ -1281,7 +1284,7 @@ test_get_corr_account_split (Fixture *fixture, gconstpointer pData)
Account *acc1 = xaccMallocAccount (book);
Account *acc2 = xaccMallocAccount (book);
Account *acc3 = xaccMallocAccount (book);
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "gboolean get_corr_account_split(const Split *, const Split **)"
#else
#define _func "get_corr_account_split"
diff --git a/src/engine/test/utest-Transaction.c b/src/engine/test/utest-Transaction.c
index 0a54140..7611c2c 100644
--- a/src/engine/test/utest-Transaction.c
+++ b/src/engine/test/utest-Transaction.c
@@ -40,6 +40,9 @@
#else
#define _Q "`"
#endif
+#if defined(__clang__) && (__clang_major__ == 5 || (__clang_major__ == 3 && __clang_minor__ < 5))
+#define USE_CLANG_FUNC_SIG 1
+#endif
static const gchar *suitename = "/engine/Transaction";
void test_suite_transaction ( void );
@@ -485,7 +488,7 @@ test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
QofBook *book = qof_book_new ();
TestSignal sig1 = test_signal_new (NULL, QOF_EVENT_CREATE,NULL);
Transaction *txn;
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "Transaction *xaccMallocTransaction(QofBook *)"
#else
#define _func "xaccMallocTransaction"
@@ -1272,7 +1275,7 @@ xaccTransGetAccountBalance (const Transaction *trans,// C: 1 Local: 0:0:0
static void
test_xaccTransGetAccountBalance (Fixture *fixture, gconstpointer pData)
{
-#if defined(__clang__) && __clang_major__ < 6
+#ifdef USE_CLANG_FUNC_SIG
#define _func "gnc_numeric xaccTransGetAccountBalance(const Transaction *, const Account *)"
#else
#define _func "xaccTransGetAccountBalance"
diff --git a/src/gnome-utils/gnc-dense-cal.c b/src/gnome-utils/gnc-dense-cal.c
index f25e792..d2e0b38 100644
--- a/src/gnome-utils/gnc-dense-cal.c
+++ b/src/gnome-utils/gnc-dense-cal.c
@@ -581,7 +581,7 @@ gnc_dense_cal_set_num_months(GncDenseCal *dcal, guint num_months)
gint months_val, delta_months;
gtk_tree_model_get(GTK_TREE_MODEL(options), &view_opts_iter, VIEW_OPTS_COLUMN_NUM_MONTHS, &months_val, -1);
- delta_months = abs(months_val - num_months);
+ delta_months = abs(months_val - (gint)num_months);
if (delta_months < closest_index_distance)
{
iter_closest_to_req = view_opts_iter;
diff --git a/src/import-export/import-backend.c b/src/import-export/import-backend.c
index a372bc4..6fb4730 100644
--- a/src/import-export/import-backend.c
+++ b/src/import-export/import-backend.c
@@ -686,7 +686,7 @@ static void split_find_match (GNCImportTransInfo * trans_info,
/* Date heuristics */
match_time = xaccTransGetDate (xaccSplitGetParent (split));
download_time = xaccTransGetDate (new_trans);
- datediff_day = abs(match_time - download_time) / 86400;
+ datediff_day = labs(match_time - download_time) / 86400;
/* Sorry, there are not really functions around at all that
provide for less hacky calculation of days of date
differences. Whatever. On the other hand, the difference
diff --git a/src/libqof/qof/test/test-gnc-date.c b/src/libqof/qof/test/test-gnc-date.c
index 1cccfe6..9238ab2 100644
--- a/src/libqof/qof/test/test-gnc-date.c
+++ b/src/libqof/qof/test/test-gnc-date.c
@@ -1742,7 +1742,7 @@ test_gnc_timespec_to_iso8601_buff (void)
gchar *logdomain = "qof";
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
#if defined(__clang__) && __clang_major__ < 6
-#define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
+#define _func "char *gnc_timespec_to_iso8601_buff(Timespec, char *)"
#else
#define _func "char* gnc_timespec_to_iso8601_buff(Timespec, char*)"
//#define _func "gnc_timespec_to_iso8601_buff"
Summary of changes:
src/app-utils/guile-util.c | 2 +-
src/engine/test/utest-Account.c | 14 ++++++++------
src/engine/test/utest-Split.cpp | 5 ++++-
src/engine/test/utest-Transaction.c | 7 +++++--
src/gnome-utils/gnc-dense-cal.c | 2 +-
src/import-export/import-backend.c | 2 +-
src/libqof/qof/test/Makefile.am | 3 +++
src/libqof/qof/test/test-gnc-date.c | 2 +-
8 files changed, 24 insertions(+), 13 deletions(-)
More information about the gnucash-changes
mailing list