alex1818 / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
0 stars 0 forks source link

test_buckets.c gcc compile error on non-win32 (invalid // comment) #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile serf-1.3.8 (scons)
2. Run test suite (scons check) using gcc on Linux (or non-win32 platform)

What is the expected output? What do you see instead?
The test suite code should compile without errors (to allow the test suite to 
execute).

What version of the product are you using? On what operating system?
serf 1.3.8, CentOS Linux 6.5 x86_64, gcc 4.4.7

Please provide any additional information below.

1. CFLAGS '-std=c89' is set by SConstruct for non-win32 platforms
   if sys.platform != 'win32':
     ### gcc only. figure out appropriate test / better way to check these
     ### flags, and check for gcc.
     env.Append(CFLAGS='-std=c89')

2. test/test_buckets.c use a C++ style comment "//" not valid until C99 to 
comment out a line of code
   1237 //    buf_size = orig_len + (orig_len / 1000) + 12;

   The 1.3.x branch received this from trunk r2419.

3. scons check (command output)
...
test/test_buckets.c: In function 'deflate_compress':
test/test_buckets.c:1237: error: expected expression before '/' token
test/test_buckets.c: In function 'create_gzip_deflate_bucket':
test/test_buckets.c:1436: warning: ISO C90 forbids mixed declarations and code
test/test_buckets.c: In function 'test_deflate_4GBplus_buckets':
test/test_buckets.c:1559: warning: integer overflow in expression
scons: *** [test/test_buckets.o] Error 1
scons: building terminated because of errors.

Original issue reported on code.google.com by bryan.sh...@gmail.com on 28 Oct 2014 at 11:03

GoogleCodeExporter commented 9 years ago
Already fixed in trunk r2443

Original comment by andreas.stieger@gmx.de on 28 Oct 2014 at 11:05