mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Adjust #ifdef __clang__ to exclude clang versions > 6
This works only with Apple clang; the regular clang is at version 3, but hasn't been tested for what versions emit what sort of function signatures to logs.
This commit is contained in:
parent
745ff9e519
commit
02acf2b6f4
@ -462,7 +462,7 @@ test_gnc_account_list_name_violations (Fixture *fixture, gconstpointer pData)
|
|||||||
{
|
{
|
||||||
guint log_level = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
guint log_level = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
||||||
gchar *log_domain = "gnc.engine";
|
gchar *log_domain = "gnc.engine";
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "GList *gnc_account_list_name_violations(QofBook *, const gchar *)"
|
#define _func "GList *gnc_account_list_name_violations(QofBook *, const gchar *)"
|
||||||
#else
|
#else
|
||||||
#define _func "gnc_account_list_name_violations"
|
#define _func "gnc_account_list_name_violations"
|
||||||
@ -749,7 +749,7 @@ test_xaccCloneAccount (Fixture *fixture, gconstpointer pData)
|
|||||||
Account *clone;
|
Account *clone;
|
||||||
QofBook *book = gnc_account_get_book (fixture->acct);
|
QofBook *book = gnc_account_get_book (fixture->acct);
|
||||||
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "Account *xaccCloneAccount(const Account *, QofBook *)"
|
#define _func "Account *xaccCloneAccount(const Account *, QofBook *)"
|
||||||
#else
|
#else
|
||||||
#define _func "xaccCloneAccount"
|
#define _func "xaccCloneAccount"
|
||||||
@ -852,7 +852,7 @@ test_xaccFreeAccount (Fixture *fixture, gconstpointer pData)
|
|||||||
{
|
{
|
||||||
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
|
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
|
||||||
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
|
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
|
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
|
||||||
#else
|
#else
|
||||||
#define _func "xaccTransGetSplitIndex"
|
#define _func "xaccTransGetSplitIndex"
|
||||||
@ -966,7 +966,7 @@ test_xaccAccountCommitEdit (Fixture *fixture, gconstpointer pData)
|
|||||||
{
|
{
|
||||||
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
|
gchar *msg1 = "[xaccFreeAccount()] instead of calling xaccFreeAccount(), please call \n"
|
||||||
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
|
" xaccAccountBeginEdit(); xaccAccountDestroy(); \n";
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
|
#define _func "int xaccTransGetSplitIndex(const Transaction *, const Split *)"
|
||||||
#else
|
#else
|
||||||
#define _func "xaccTransGetSplitIndex"
|
#define _func "xaccTransGetSplitIndex"
|
||||||
@ -1083,7 +1083,7 @@ test_gnc_account_insert_remove_split (Fixture *fixture, gconstpointer pData)
|
|||||||
Split *split3 = xaccMallocSplit (book);
|
Split *split3 = xaccMallocSplit (book);
|
||||||
TestSignal sig1, sig2, sig3;
|
TestSignal sig1, sig2, sig3;
|
||||||
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
|
AccountPrivate *priv = fixture->func->get_private (fixture->acct);
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "gboolean gnc_account_insert_split(Account *, Split *)"
|
#define _func "gboolean gnc_account_insert_split(Account *, Split *)"
|
||||||
#else
|
#else
|
||||||
#define _func "gnc_account_insert_split"
|
#define _func "gnc_account_insert_split"
|
||||||
|
@ -1269,7 +1269,7 @@ test_get_corr_account_split (Fixture *fixture, gconstpointer pData)
|
|||||||
Account *acc1 = xaccMallocAccount (book);
|
Account *acc1 = xaccMallocAccount (book);
|
||||||
Account *acc2 = xaccMallocAccount (book);
|
Account *acc2 = xaccMallocAccount (book);
|
||||||
Account *acc3 = xaccMallocAccount (book);
|
Account *acc3 = xaccMallocAccount (book);
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "gboolean get_corr_account_split(const Split *, const Split **)"
|
#define _func "gboolean get_corr_account_split(const Split *, const Split **)"
|
||||||
#else
|
#else
|
||||||
#define _func "get_corr_account_split"
|
#define _func "get_corr_account_split"
|
||||||
|
@ -486,7 +486,7 @@ test_xaccMallocTransaction (Fixture *fixture, gconstpointer pData)
|
|||||||
QofBook *book = qof_book_new ();
|
QofBook *book = qof_book_new ();
|
||||||
TestSignal sig1 = test_signal_new (NULL, QOF_EVENT_CREATE,NULL);
|
TestSignal sig1 = test_signal_new (NULL, QOF_EVENT_CREATE,NULL);
|
||||||
Transaction *txn;
|
Transaction *txn;
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "Transaction *xaccMallocTransaction(QofBook *)"
|
#define _func "Transaction *xaccMallocTransaction(QofBook *)"
|
||||||
#else
|
#else
|
||||||
#define _func "xaccMallocTransaction"
|
#define _func "xaccMallocTransaction"
|
||||||
@ -1272,7 +1272,7 @@ xaccTransGetAccountBalance (const Transaction *trans,// C: 1 Local: 0:0:0
|
|||||||
static void
|
static void
|
||||||
test_xaccTransGetAccountBalance (Fixture *fixture, gconstpointer pData)
|
test_xaccTransGetAccountBalance (Fixture *fixture, gconstpointer pData)
|
||||||
{
|
{
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "gnc_numeric xaccTransGetAccountBalance(const Transaction *, const Account *)"
|
#define _func "gnc_numeric xaccTransGetAccountBalance(const Transaction *, const Account *)"
|
||||||
#else
|
#else
|
||||||
#define _func "xaccTransGetAccountBalance"
|
#define _func "xaccTransGetAccountBalance"
|
||||||
|
@ -69,7 +69,7 @@ test_gnc_localtime (void)
|
|||||||
// difference between g_date_time and tm->tm_wday)
|
// difference between g_date_time and tm->tm_wday)
|
||||||
};
|
};
|
||||||
guint ind;
|
guint ind;
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "struct tm *gnc_localtime_r(const time64 *, struct tm *)"
|
#define _func "struct tm *gnc_localtime_r(const time64 *, struct tm *)"
|
||||||
#else
|
#else
|
||||||
#define _func "gnc_localtime_r"
|
#define _func "gnc_localtime_r"
|
||||||
@ -140,7 +140,7 @@ test_gnc_gmtime (void)
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
guint ind;
|
guint ind;
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "struct tm *gnc_gmtime(const time64 *)"
|
#define _func "struct tm *gnc_gmtime(const time64 *)"
|
||||||
#else
|
#else
|
||||||
#define _func "gnc_gmtime"
|
#define _func "gnc_gmtime"
|
||||||
@ -1718,7 +1718,7 @@ test_gnc_timespec_to_iso8601_buff (void)
|
|||||||
gchar *end;
|
gchar *end;
|
||||||
gchar *logdomain = "qof";
|
gchar *logdomain = "qof";
|
||||||
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
|
#define _func "gchar *gnc_timespec_to_iso8601_buff(Timespec, char *)"
|
||||||
#else
|
#else
|
||||||
#define _func "gnc_timespec_to_iso8601_buff"
|
#define _func "gnc_timespec_to_iso8601_buff"
|
||||||
|
@ -611,7 +611,7 @@ test_book_foreach_collection( Fixture *fixture, gconstpointer pData )
|
|||||||
QofIdType my_type = "my_type", my_type2 = "my_type2";
|
QofIdType my_type = "my_type", my_type2 = "my_type2";
|
||||||
guint param = (guint) g_test_rand_int();
|
guint param = (guint) g_test_rand_int();
|
||||||
/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
|
/* GLib assertion messages which aren't filtered to make clang's output like gcc's */
|
||||||
#ifdef __clang__
|
#if defined(__clang__) && __clang_major__ < 6
|
||||||
#define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
|
#define _func "void qof_book_foreach_collection(const QofBook *, QofCollectionForeachCB, gpointer)"
|
||||||
#else
|
#else
|
||||||
#define _func "qof_book_foreach_collection"
|
#define _func "qof_book_foreach_collection"
|
||||||
|
Loading…
Reference in New Issue
Block a user