You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2021/03/11 02:08:54 UTC
[qpid-proton] branch master updated: PROTON-2340: Small fixes to
raw_echo to avoid warnings
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/master by this push:
new 72fa713 PROTON-2340: Small fixes to raw_echo to avoid warnings
72fa713 is described below
commit 72fa71356e346c9a544f7daa03112ce87071704b
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Wed Mar 10 21:03:28 2021 -0500
PROTON-2340: Small fixes to raw_echo to avoid warnings
Also avoid requiring C99.
---
c/examples/raw_echo.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 @@ void* run(void *arg) {
}
pn_proactor_done(app->proactor, events);
} while(again);
+ return NULL;
}
@@ -375,7 +376,8 @@ int main(int argc, char **argv) {
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 @@ int main(int argc, char **argv) {
}
run(&app);
- for (int n=0; n<thread_count; n++) {
+ for (n=0; n<thread_count; n++) {
pthread_join(threads[n], 0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org