summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-07-24 06:26:47 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-07-24 06:26:47 +0000
commit0b77a69691d6c7ef7117f9c141bd1301d083011c (patch)
tree44a4d7c1042bd2941364ccad406c9e72bfabc3ff /src/lib
parent9b63c422030b302154ad57541ccc5375cdc7e215 (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Conditional code cleanup resubmit Hi mamedev, This is a resubmit of a previous patch. The earlier version would not compile with 32-bit MSVC, due to the fact that its linker required external dependencies in dead code to be met before dead code elimination was done, causing linker errors. The proper fix for this would be to add the necessary dependencies, so I instead simply left the conditional code in place in winalloc.c and chd.c. ~aa Original submission email below: ---- Conditionally compiled code tends to bitrot, so MAME should try to avoid it as much as possible. I sent a patch six months ago to eliminate conditional code associated with logging, here's another patch that does more of this. Some notes: 1. drc_ops.c: I couldn't find a LOG_CODE anywhere, so I used if (0). 2. romload.c: I converted all the users of debugload to use LOG((...)) instead, following the traditional conditional logging pattern. 3. windows/sound.c: I eliminated the separate sound log and directed the few outputs to the error log. ~aa
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/chd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/util/chd.c b/src/lib/util/chd.c
index e34255aa93f..d9083fc73e1 100644
--- a/src/lib/util/chd.c
+++ b/src/lib/util/chd.c
@@ -812,9 +812,7 @@ void chd_close(chd_file *chd)
if (chd->owns_file && chd->file != NULL)
core_fclose(chd->file);
-#if PRINTF_MAX_HUNK
- printf("Max hunk = %d/%d\n", chd->maxhunk, chd->header.totalhunks);
-#endif
+ if (PRINTF_MAX_HUNK) printf("Max hunk = %d/%d\n", chd->maxhunk, chd->header.totalhunks);
/* free our memory */
free(chd);