mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix ISO C90 (#153465).
* src/engine/test/test-transaction-reversal.c: * src/engine/test-core/test-engine-stuff.c: Fix for ISO C90. Fixes #153465. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10267 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
b986f2e2d8
commit
6e4a7b2f24
@ -1,3 +1,9 @@
|
||||
2004-09-22 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/engine/test/test-transaction-reversal.c:
|
||||
* src/engine/test-core/test-engine-stuff.c:
|
||||
Fix for ISO C90. Fixes #153465.
|
||||
|
||||
2004-09-06 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/dialog-hbcitrans.c,
|
||||
|
@ -873,14 +873,17 @@ add_random_splits(QofBook *book, Transaction *trn, GList *account_list)
|
||||
{
|
||||
Account *acc, *bcc;
|
||||
Split *s;
|
||||
gnc_commodity *com;
|
||||
int scu;
|
||||
gnc_numeric num;
|
||||
|
||||
/* Gotta have at least two different accounts */
|
||||
if (1 >= g_list_length (account_list)) return;
|
||||
|
||||
/* Set up two splits whose values really are opposites. */
|
||||
gnc_commodity *com = xaccTransGetCurrency (trn);
|
||||
int scu = gnc_commodity_get_fraction(com);
|
||||
gnc_numeric num = get_random_gnc_numeric();
|
||||
com = xaccTransGetCurrency (trn);
|
||||
scu = gnc_commodity_get_fraction(com);
|
||||
num = get_random_gnc_numeric();
|
||||
|
||||
if (!do_bork()) num = gnc_numeric_convert (num, scu, GNC_HOW_RND_ROUND);
|
||||
|
||||
@ -1317,6 +1320,7 @@ get_random_transaction_with_currency(QofBook *book,
|
||||
GList *account_list)
|
||||
{
|
||||
Transaction* ret;
|
||||
KvpFrame *f;
|
||||
|
||||
if (!account_list)
|
||||
{
|
||||
@ -1338,7 +1342,7 @@ get_random_transaction_with_currency(QofBook *book,
|
||||
trn_add_ran_timespec(ret, xaccTransSetDatePostedTS);
|
||||
trn_add_ran_timespec(ret, xaccTransSetDateEnteredTS);
|
||||
|
||||
KvpFrame *f = get_random_kvp_frame();
|
||||
f = get_random_kvp_frame();
|
||||
xaccTransSetSlots_nc(ret, f);
|
||||
|
||||
add_random_splits(book, ret, account_list);
|
||||
|
@ -55,8 +55,10 @@ run_test (void)
|
||||
/* Find a transaction that isn't voided */
|
||||
do
|
||||
{
|
||||
gboolean voyd;
|
||||
|
||||
transaction = get_random_transaction (book);
|
||||
gboolean voyd = xaccTransGetVoidStatus (transaction);
|
||||
voyd = xaccTransGetVoidStatus (transaction);
|
||||
if (voyd)
|
||||
{
|
||||
xaccTransBeginEdit (transaction);
|
||||
|
Loading…
Reference in New Issue
Block a user