diff options
author | dimitri staessens <[email protected]> | 2016-10-21 20:13:41 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-10-22 13:27:02 +0200 |
commit | 3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2 (patch) | |
tree | 881da180b8d801c38ba0fbad2fc9f387a70ec016 /src/tools/oping/oping_client.c | |
parent | d5a52f3951fff7ee272bd0d4cd95cd122d07fa64 (diff) | |
download | ouroboros-3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2.tar.gz ouroboros-3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2.zip |
build: Compile with strict conversion
This has the code checked with -Wcast-qual and -Wconversion flags.
These flags were removed because SWIG generated code fails.
Diffstat (limited to 'src/tools/oping/oping_client.c')
-rw-r--r-- | src/tools/oping/oping_client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c index c2471b46..9f49a1df 100644 --- a/src/tools/oping/oping_client.c +++ b/src/tools/oping/oping_client.c @@ -62,8 +62,8 @@ void * reader(void * o) struct oping_msg * msg = (struct oping_msg *) buf; int fd = 0; int msg_len = 0; - float ms = 0; - float d = 0; + double ms = 0; + double d = 0; fqueue_t * fq = fqueue_create(); if (fq == NULL) return (void *) 1; @@ -83,7 +83,7 @@ void * reader(void * o) continue; } - if ((int) ntohl(msg->id) >= client.count) { + if (ntohl(msg->id) >= (ssize_t) client.count) { printf("Invalid id.\n"); continue; } @@ -94,7 +94,7 @@ void * reader(void * o) pthread_mutex_lock(&client.lock); ms = ts_diff_us(&client.times[ntohl(msg->id)], &now) - /1000.0; + / 1000.0; pthread_mutex_unlock(&client.lock); printf("%d bytes from %s: seq=%d time=%.3f ms\n", @@ -164,7 +164,7 @@ void * writer(void * o) return (void *) 0; } -int client_main() +int client_main(void) { struct sigaction sig_act; |