Browse code

ndb_redis: fix compilation warnings

> warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]

Victor Seva authored on 19/12/2018 23:04:54
Showing 1 changed files
... ...
@@ -758,7 +758,7 @@ int check_cluster_reply(redisReply *reply, redisc_server_t **rsrv)
758 758
 	char spec_new[100];
759 759
 
760 760
 	if(redis_cluster_param) {
761
-		LM_DBG("Redis replied: \"%.*s\"\n", reply->len, reply->str);
761
+		LM_DBG("Redis replied: \"%.*s\"\n", (int)reply->len, reply->str);
762 762
 		if((reply->len > 7) && (strncmp(reply->str, "MOVED", 5) == 0)) {
763 763
 			port = 6379;
764 764
 			if(strchr(reply->str, ':') > 0) {
... ...
@@ -769,7 +769,7 @@ int check_cluster_reply(redisReply *reply, redisc_server_t **rsrv)
769 769
 				LM_DBG("Port \"%.*s\" [%i] => %i\n", tmpstr.len, tmpstr.s,
770 770
 						tmpstr.len, port);
771 771
 			} else {
772
-				LM_ERR("No Port in REDIS MOVED Reply (%.*s)\n", reply->len,
772
+				LM_ERR("No Port in REDIS MOVED Reply (%.*s)\n", (int)reply->len,
773 773
 						reply->str);
774 774
 				return 0;
775 775
 			}
... ...
@@ -778,7 +778,7 @@ int check_cluster_reply(redisReply *reply, redisc_server_t **rsrv)
778 778
 				addr.s = strchr(reply->str + 6, ' ') + 1;
779 779
 				LM_DBG("Host \"%.*s\" [%i]\n", addr.len, addr.s, addr.len);
780 780
 			} else {
781
-				LM_ERR("No Host in REDIS MOVED Reply (%.*s)\n", reply->len,
781
+				LM_ERR("No Host in REDIS MOVED Reply (%.*s)\n", (int)reply->len,
782 782
 						reply->str);
783 783
 				return 0;
784 784
 			}