From 9d06960949d8e58776de60f245c35184f1ed7441 Mon Sep 17 00:00:00 2001 From: wahidw Date: Mon, 5 Apr 2021 14:51:31 +0000 Subject: [PATCH] Fixed some static code errors Signed-off-by: wahidw Change-Id: Icd3a57c4478759de92472159692fab330eee79dd --- CMakeLists.txt | 2 +- src/rmr/common/src/rt_generic_static.c | 4 ++-- src/rmr/si/src/mt_call_si_static.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b31f0cb..a8220b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ cmake_minimum_required( VERSION 3.5 ) set( major_version "4" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "7" ) -set( patch_level "0" ) +set( patch_level "1" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_inc "include/rmr" ) diff --git a/src/rmr/common/src/rt_generic_static.c b/src/rmr/common/src/rt_generic_static.c index 9aa58f1..2e4b711 100644 --- a/src/rmr/common/src/rt_generic_static.c +++ b/src/rmr/common/src/rt_generic_static.c @@ -891,7 +891,7 @@ static void cycle_snarfed_rt( uta_ctx_t* ctx ) { if( ctx->snarf_rt_fd < 0 ) { rmr_vlog( RMR_VL_WARN, "rmr_rtc: unable to open trt file: %s: %s\n", tfname, strerror( errno ) ); } else { - if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "rmr_rtc: rt snarf file opened: %s: %s\n", tfname ); + if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "rmr_rtc: rt snarf file opened: %s\n", tfname ); } } @@ -1084,7 +1084,7 @@ static void parse_rt_rec( uta_ctx_t* ctx, uta_ctx_t* pctx, char* buf, int vleve if( ctx->new_rtable == NULL ) { // update table not in progress break; } - if( ctx && ctx->snarf_rt_fd >= 0 ) { + if( ctx->snarf_rt_fd >= 0 ) { cycle_snarfed_rt( ctx ); // make it available and open a new one } diff --git a/src/rmr/si/src/mt_call_si_static.c b/src/rmr/si/src/mt_call_si_static.c index 27c707b..c117a5c 100644 --- a/src/rmr/si/src/mt_call_si_static.c +++ b/src/rmr/si/src/mt_call_si_static.c @@ -45,7 +45,7 @@ static inline void queue_normal( uta_ctx_t* ctx, rmr_mbuf_t* mbuf ) { //dcount++; ctx->dcount++; if( time( NULL ) > last_warning + 60 ) { // issue warning no more frequently than every 60 sec - rmr_vlog( RMR_VL_ERR, "rmr_mt_receive: application is not receiving fast enough; %ld msgs dropped since last warning\n", ctx->dcount ); + rmr_vlog( RMR_VL_ERR, "rmr_mt_receive: application is not receiving fast enough; %d msgs dropped since last warning\n", ctx->dcount ); last_warning = time( NULL ); ctx->dcount = 0; } -- 2.16.6