From 581f27825e2a068786274bd9a28eb3241111467d Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Thu, 13 Jun 2013 07:58:49 +0000 Subject: [PATCH] Revert r23043 "Minor code cleanup: Don't print "warning" output in comparison function." Sigh. It turns out the utest-Split.c relies on the "warning" log level in order to check for specific code paths. This sucks. The log level "warning" should please be reserved for things that are actual warnings, not for code path checks that are used in the unittests. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23048 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/Transaction.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index 53f01b2d4a..e27cbee1e8 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -780,7 +780,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, if (!ta || !tb) { - PINFO ("one is NULL"); + PWARN ("one is NULL"); return FALSE; } @@ -792,14 +792,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, { if (qof_instance_guid_compare(ta, tb) != 0) { - PINFO ("GUIDs differ"); + PWARN ("GUIDs differ"); return FALSE; } } if (!gnc_commodity_equal(ta->common_currency, tb->common_currency)) { - PINFO ("commodities differ %s vs %s", + PWARN ("commodities differ %s vs %s", gnc_commodity_get_unique_name (ta->common_currency), gnc_commodity_get_unique_name (tb->common_currency)); return FALSE; @@ -812,7 +812,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, (void)gnc_timespec_to_iso8601_buff(ta->date_entered, buf1); (void)gnc_timespec_to_iso8601_buff(tb->date_entered, buf2); - PINFO ("date entered differs: '%s' vs '%s'", buf1, buf2); + PWARN ("date entered differs: '%s' vs '%s'", buf1, buf2); return FALSE; } @@ -823,7 +823,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, (void)gnc_timespec_to_iso8601_buff(ta->date_posted, buf1); (void)gnc_timespec_to_iso8601_buff(tb->date_posted, buf2); - PINFO ("date posted differs: '%s' vs '%s'", buf1, buf2); + PWARN ("date posted differs: '%s' vs '%s'", buf1, buf2); return FALSE; } @@ -832,14 +832,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, */ if ((same_book && ta->num != tb->num) || (!same_book && g_strcmp0(ta->num, tb->num) != 0)) { - PINFO ("num differs: %s vs %s", ta->num, tb->num); + PWARN ("num differs: %s vs %s", ta->num, tb->num); return FALSE; } if ((same_book && ta->description != tb->description) || (!same_book && g_strcmp0(ta->description, tb->description))) { - PINFO ("descriptions differ: %s vs %s", ta->description, tb->description); + PWARN ("descriptions differ: %s vs %s", ta->description, tb->description); return FALSE; } @@ -851,7 +851,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, frame_a = kvp_frame_to_string (ta->inst.kvp_data); frame_b = kvp_frame_to_string (tb->inst.kvp_data); - PINFO ("kvp frames differ:\n%s\n\nvs\n\n%s", frame_a, frame_b); + PWARN ("kvp frames differ:\n%s\n\nvs\n\n%s", frame_a, frame_b); g_free (frame_a); g_free (frame_b); @@ -863,7 +863,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, { if ((!ta->splits && tb->splits) || (!tb->splits && ta->splits)) { - PINFO ("only one has splits"); + PWARN ("only one has splits"); return FALSE; } @@ -885,7 +885,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, if (!node_b) { - PINFO ("first has split %s and second does not", + PWARN ("first has split %s and second does not", guid_to_string (xaccSplitGetGUID (split_a))); return FALSE; } @@ -901,14 +901,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb, guid_to_string_buff (xaccSplitGetGUID (split_a), str_a); guid_to_string_buff (xaccSplitGetGUID (split_b), str_b); - PINFO ("splits %s and %s differ", str_a, str_b); + PWARN ("splits %s and %s differ", str_a, str_b); return FALSE; } } if (g_list_length (ta->splits) != g_list_length (tb->splits)) { - PINFO ("different number of splits"); + PWARN ("different number of splits"); return FALSE; } }