PROTON-2340: Small fixes to raw_echo to avoid warnings
Also avoid requiring C99.
diff --git a/c/examples/raw_echo.c b/c/examples/raw_echo.c
index b89c2f8..aaea76f 100644
--- a/c/examples/raw_echo.c
+++ b/c/examples/raw_echo.c
@@ -356,6 +356,7 @@
}
pn_proactor_done(app->proactor, events);
} while(again);
+ return NULL;
}
@@ -375,7 +376,8 @@
size_t thread_count = 3;
pthread_t threads[thread_count];
- for (int n=0; n<thread_count; n++) {
+ int n;
+ for (n=0; n<thread_count; n++) {
int rc = pthread_create(&threads[n], 0, run, (void*)&app);
if (rc) {
fprintf(stderr, "Failed to create thread\n");
@@ -384,7 +386,7 @@
}
run(&app);
- for (int n=0; n<thread_count; n++) {
+ for (n=0; n<thread_count; n++) {
pthread_join(threads[n], 0);
}