Author: kjs
Date: Fri Jan 2 04:32:29 2009
New Revision: 34800
Modified:
trunk/src/debug.c
Log:
[src] the ASSERT_ARGS macro in debug.c expands to a statement, after which a
var. declaration follows. This is not allowed, and won't build on MSVC. This
patch moves the declaration to before the assertion, but it can't be 'const'
any more, as the declaration is separate from initialization.
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c (original)
+++ trunk/src/debug.c Fri Jan 2 04:32:29 2009
@@ -783,8 +783,9 @@
static void
chop_newline(ARGMOD(char * buf))
{
+ size_t l;
ASSERT_ARGS(chop_newline);
- const size_t l = strlen(buf);
+ l = strlen(buf);
if (l > 0 && buf [l - 1] == '\n')
buf [l - 1] = '\0';
}