summaryrefslogtreecommitdiff
path: root/src/tools/cbr/cbr_server.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-21 20:13:41 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-22 13:27:02 +0200
commit3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2 (patch)
tree881da180b8d801c38ba0fbad2fc9f387a70ec016 /src/tools/cbr/cbr_server.c
parentd5a52f3951fff7ee272bd0d4cd95cd122d07fa64 (diff)
downloadouroboros-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/cbr/cbr_server.c')
-rw-r--r--src/tools/cbr/cbr_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/cbr/cbr_server.c b/src/tools/cbr/cbr_server.c
index d40ae2cb..f1c342d1 100644
--- a/src/tools/cbr/cbr_server.c
+++ b/src/tools/cbr/cbr_server.c
@@ -63,7 +63,7 @@ void shutdown_server(int signo, siginfo_t * info, void * c)
void handle_flow(int fd)
{
- ssize_t count = 0;
+ int count = 0;
char buf[BUF_SIZE];
struct timespec now;
@@ -112,9 +112,9 @@ void handle_flow(int fd)
sdus - sdus_intv,
bytes_read - bytes_read_intv,
us / 1000,
- ((sdus - sdus_intv) / (float) us) * MILLION,
+ ((sdus - sdus_intv) / (double) us) * MILLION,
8 * (bytes_read - bytes_read_intv)
- / (float)(us));
+ / (double)(us));
iv_start = iv_end;
sdus_intv = sdus;
bytes_read_intv = bytes_read;
@@ -197,7 +197,7 @@ void * listener(void * o)
return 0;
}
-int server_main()
+int server_main(void)
{
struct sigaction sig_act;
int i;