From 3e2c8ca5108f1539a7325625b848389ac87e78b2 Mon Sep 17 00:00:00 2001 From: codebase7 Date: Wed, 20 May 2015 02:25:40 -0400 Subject: [PATCH] Compile fix for test.c in VC 2008. (VC 2008 assumes C89 on .c files, so all variables must be delcared at the beginning of a function.) --- test/test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.c b/test/test.c index 3487c537..8d537495 100644 --- a/test/test.c +++ b/test/test.c @@ -62,6 +62,7 @@ int main(int argc, char ** argv) { double loop_count = 2.0; double fade_seconds = 10.0; double fade_delay_seconds = 0.0; + size_t bytecount = 0; while ((opt = getopt(argc, argv, "o:l:f:d:ipPcmxeLEr:gb2:")) != -1) { switch (opt) { @@ -303,7 +304,7 @@ int main(int argc, char ** argv) { fwrite(buf,1,0x44,outfile); fseek(outfile, 4, SEEK_SET); - size_t bytecount = len*s->channels*sizeof(sample); + bytecount = len*s->channels*sizeof(sample); put_32bitLE((uint8_t*)buf, (int32_t)(bytecount+0x2c+52)); fwrite(buf,1,0x4,outfile); }