Do not interleave code and declarations in C files

Avoid C99 style to interleave code and declarations in order to compile msgpackc with Visual Studion < 2013
This commit is contained in:
tbeu
2015-03-26 21:48:03 +01:00
parent 7bee573a72
commit 8921f9dcfc
9 changed files with 514 additions and 478 deletions

View File

@@ -52,6 +52,7 @@ void unpack(receiver* r) {
msgpack_unpack_return ret;
char* buf;
size_t recv_len;
int recv_count = 0;
msgpack_unpacked_init(&result);
if (msgpack_unpacker_buffer_capacity(unp) < EACH_RECV_SIZE) {
@@ -64,7 +65,6 @@ void unpack(receiver* r) {
msgpack_unpacker_buffer_consumed(unp, recv_len);
int recv_count = 0;
while (recv_len > 0) {
int i = 0;
printf("receive count: %d %zd bytes received.:\n", recv_count++, recv_len);