From 91e3b2c11f617a126679b3d15239bdb0c1c72e4c Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sat, 20 May 2017 20:29:09 +0200 Subject: zrtp: fix warnings on OSX 10.6 --- modules/zrtp/zrtp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/zrtp/zrtp.c b/modules/zrtp/zrtp.c index ed435dd..4b42e61 100644 --- a/modules/zrtp/zrtp.c +++ b/modules/zrtp/zrtp.c @@ -318,6 +318,8 @@ static int verify_sas(struct re_printf *pf, void *arg) static void zrtp_log(int level, char *data, int len, int offset) { + (void)offset; + if (level == 1) { error("%b\n", data, len); } @@ -341,7 +343,7 @@ static int module_init(void) char config_path[256] = ""; char zrtp_zid_path[256] = ""; FILE *f; - int err; + int ret, err; zrtp_log_set_log_engine(zrtp_log); @@ -360,14 +362,14 @@ static int module_init(void) warning("zrtp: could not get config path: %m\n", err); return err; } - zrtp_config.def_cache_path.length = - re_snprintf(zrtp_config.def_cache_path.buffer, - zrtp_config.def_cache_path.max_length, - "%s/zrtp_cache.dat", config_path); - if (zrtp_config.def_cache_path.length < 0) { + ret = re_snprintf(zrtp_config.def_cache_path.buffer, + zrtp_config.def_cache_path.max_length, + "%s/zrtp_cache.dat", config_path); + if (ret < 0) { warning("zrtp: could not write cache path\n"); return ENOMEM; } + zrtp_config.def_cache_path.length = ret; if (re_snprintf(zrtp_zid_path, sizeof(zrtp_zid_path), -- cgit v1.2.3