Fix a "set but not used warning" in xdelta3.c, revert definition of XD3_ASSERT.

git-svn-id: https://svn.eduke32.com/eduke32@2733 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-06-03 19:20:32 +00:00
parent 1404174584
commit 2df94e8bc7
2 changed files with 10 additions and 4 deletions

View file

@ -2654,10 +2654,16 @@ xd3_set_source (xd3_stream *stream,
* calculations are cheap. */
if (!xd3_check_pow2 (src->blksize, &shiftby) == 0)
{
int check;
src->blksize = xd3_pow2_roundup(src->blksize);
#if XD3_DEBUG
{
int check;
check = xd3_check_pow2 (src->blksize, &shiftby);
XD3_ASSERT (check == 0);
}
#else
xd3_check_pow2 (src->blksize, &shiftby);
#endif
IF_DEBUG1 (DP(RINT "raising srcblksz to %u\n", src->blksize));
}

View file

@ -297,7 +297,7 @@ typedef int (xd3_comp_table_func) (xd3_stream *stream,
do { if (! (x)) { DP(RINT "%s:%d: XD3 assertion failed: %s\n", __FILE__, __LINE__, #x); \
abort (); } } while (0)
#else
#define XD3_ASSERT(x)
#define XD3_ASSERT(x) (void)0
#endif /* XD3_DEBUG */
#ifdef __GNUC__