Index: extensions/app_radgw/radius.c
===================================================================
--- extensions/app_radgw/radius.c	(revision 996)
+++ extensions/app_radgw/radius.c	(revision 1027)
@@ -519,5 +519,5 @@
 	int ret = 0;
 	
-	TRACE_ENTRY("%p %g %p", buf, len, msg);
+	TRACE_ENTRY("%p %zd %p", buf, len, msg);
 	
 	CHECK_PARAMS( buf && len >= sizeof(*hdr) && msg );
Index: extensions/app_radgw/rgw_clients.c
===================================================================
--- extensions/app_radgw/rgw_clients.c	(revision 977)
+++ extensions/app_radgw/rgw_clients.c	(revision 1027)
@@ -163,5 +163,5 @@
 				if (now - r->received > DUPLICATE_CHECK_LIFETIME) {
 				
-					TRACE_DEBUG(ANNOYING + 1, "Purging RADIUS request (id: %02hhx, port: %hu, dup #%d, age %d secs)", r->id, ntohs(r->port), r->nbdup, now - r->received);
+					TRACE_DEBUG(ANNOYING + 1, "Purging RADIUS request (id: %02hhx, port: %hu, dup #%d, age %ld secs)", r->id, ntohs(r->port), r->nbdup, (long)(now - r->received));
 					
 					/* Remove this record */
@@ -459,6 +459,6 @@
 		time_t now = time(NULL);
 		r->nbdup += 1;
-		TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu, dup #%d, previously seen %d secs ago).", 
-				r->id, ntohs(r->port), r->nbdup, now - r->received);
+		TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu, dup #%d, previously seen %ld secs ago).", 
+				r->id, ntohs(r->port), r->nbdup, (long)(now - r->received));
 		
 		if (r->ans) {
@@ -780,5 +780,5 @@
 				if (cli->type == RGW_CLI_NAS) {
 					TRACE_DEBUG(INFO, "The NAS-Identifier value '%.*s' resolves to a different IP than the client's, discarding the message. Configure this client as a Proxy if this message should be valid.", 
-						nas_id_len, nas_id + 1);
+						(int)nas_id_len, (char *)(nas_id + 1));
 					return EINVAL;
 				} else {
@@ -813,5 +813,5 @@
 
 				cli->aliases_nb ++;
-				TRACE_DEBUG(FULL, "Saved valid alias for client: '%.*s' -> '%s'", nas_id_len, nas_id + 1, cli->fqdn);
+				TRACE_DEBUG(FULL, "Saved valid alias for client: '%.*s' -> '%s'", (int)nas_id_len, (char *)(nas_id + 1), cli->fqdn);
 				CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) );
 			}
Index: extensions/app_radgw/rgw_servers.c
===================================================================
--- extensions/app_radgw/rgw_servers.c	(revision 996)
+++ extensions/app_radgw/rgw_servers.c	(revision 1027)
@@ -279,5 +279,5 @@
 		char __buf[1024];
 		sSA_DUMP_NODE_SERV(__buf, sizeof(__buf), &sto, NI_NUMERICHOST | NI_NUMERICSERV );
-		TRACE_DEBUG(FULL, "Sending %d bytes to %s", buflen, __buf);
+		TRACE_DEBUG(FULL, "Sending %zd bytes to %s", buflen, __buf);
 	}
 		
Index: extensions/app_radgw/rgwx_acct.c
===================================================================
--- extensions/app_radgw/rgwx_acct.c	(revision 996)
+++ extensions/app_radgw/rgwx_acct.c	(revision 1027)
@@ -365,5 +365,5 @@
 					si = v + pref_len;
 					si_len = attr_len - pref_len;
-					TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), SI:'%.*s'.", prefix, idx, si_len, si);
+					TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), SI:'%.*s'.", prefix, idx, (int)si_len, si);
 					/* Remove from the message */
 					for (i = idx + 1; i < rad_req->attr_used; i++)
@@ -377,5 +377,5 @@
 					un = v;
 					un_len = attr_len;
-					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", un_len, un);
+					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)un_len, un);
 				}
 				break;
@@ -490,5 +490,5 @@
 		CHECK_FCT( fd_sess_fromsid_msg ( si, si_len, &sess, NULL) );
 		
-		TRACE_DEBUG(FULL, "[acct.rgwx] Translating new accounting message for session '%.*s'...", si_len, si);
+		TRACE_DEBUG(FULL, "[acct.rgwx] Translating new accounting message for session '%.*s'...", (int)si_len, si);
 		
 		/* Add the Session-Id AVP as first AVP */
@@ -1271,11 +1271,11 @@
 			fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response",
 					ahdr->avp_value->u32, 
-					oh->avp_value->os.len, oh->avp_value->os.data,
-					sidlen, sid);
+					(int)oh->avp_value->os.len, oh->avp_value->os.data,
+					(int)sidlen, sid);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp) );
 			if (avp) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
 				fd_log_debug("[acct.rgwx]   Error-Message content: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp) );
@@ -1283,5 +1283,5 @@
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
 				fd_log_debug("[acct.rgwx]   Error-Reporting-Host: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp) );
Index: extensions/app_radgw/rgwx_auth.c
===================================================================
--- extensions/app_radgw/rgwx_auth.c	(revision 996)
+++ extensions/app_radgw/rgwx_auth.c	(revision 1027)
@@ -369,5 +369,5 @@
 					si_len = attr_len - i;
 
-					TRACE_DEBUG(ANNOYING, "Attribute parsed successfully: DH:'%.*s' DR:'%.*s' SI:'%.*s'.", dh_len, dh, dr_len, dr, si_len, si);
+					TRACE_DEBUG(ANNOYING, "Attribute parsed successfully: DH:'%.*s' DR:'%.*s' SI:'%.*s'.", (int)dh_len, dh, (int)dr_len, dr, (int)si_len, si);
 					/* Remove from the message */
 					for (i = idx + 1; i < rad_req->attr_used; i++)
@@ -379,5 +379,5 @@
 		
 			case RADIUS_ATTR_USER_NAME:
-				TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr_len, attr_len ? (char *)attr_val : "");
+				TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)attr_len, attr_len ? (char *)attr_val : "");
 				un = attr_val;
 				un_len = attr_len;
@@ -1242,11 +1242,11 @@
 			fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject",
 					ahdr->avp_value->u32, 
-					oh->avp_value->os.len, oh->avp_value->os.data,
-					sidlen, sid);
+					(int)oh->avp_value->os.len, oh->avp_value->os.data,
+					(int)sidlen, sid);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp_x) );
 			if (avp_x) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
 				fd_log_debug("[auth.rgwx]   Error-Message content: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp_x) );
@@ -1254,5 +1254,5 @@
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
 				fd_log_debug("[auth.rgwx]   Error-Reporting-Host: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp_x) );
@@ -1457,6 +1457,6 @@
 								(ahdr->avp_value->u32 == 1) ? "AUTHENTICATE_ONLY" :
 									((ahdr->avp_value->u32 == 2) ? "AUTHORIZE_ONLY" : "???"),
-								oh->avp_value->os.len, oh->avp_value->os.data, 
-								sidlen, sid);
+								(int)oh->avp_value->os.len, oh->avp_value->os.data, 
+								(int)sidlen, sid);
 					}
 					break;
@@ -1618,6 +1618,6 @@
 					/* This is not translatable to RADIUS */
 					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
-							oh->avp_value->os.len, oh->avp_value->os.data,
-							sidlen, sid);
+							(int)oh->avp_value->os.len, oh->avp_value->os.data,
+							(int)sidlen, sid);
 					handled = 0;
 					break;
@@ -1651,6 +1651,6 @@
 					/* This is not translatable to RADIUS */
 					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
-							oh->avp_value->os.len, oh->avp_value->os.data,
-							sidlen, sid);
+							(int)oh->avp_value->os.len, oh->avp_value->os.data,
+							(int)sidlen, sid);
 					handled = 0;
 					break;
@@ -1859,5 +1859,5 @@
 						
 						if (ahdr->avp_value->os.len != 64) {
-							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64.", ahdr->avp_value->os.len)
+							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %zd != 64.", ahdr->avp_value->os.len)
 						}
 						
Index: extensions/app_radgw/rgwx_sip.c
===================================================================
--- extensions/app_radgw/rgwx_sip.c	(revision 996)
+++ extensions/app_radgw/rgwx_sip.c	(revision 1027)
@@ -366,5 +366,5 @@
 				if (attr->length>sizeof(struct radius_attr_hdr)) 
 				{
-					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr->length- sizeof(struct radius_attr_hdr), (char *)(attr+1));
+					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)(attr->length- sizeof(struct radius_attr_hdr)), (char *)(attr+1));
 					un = (os0_t)(attr + 1);
 					un_len =attr->length - sizeof(struct radius_attr_hdr);
@@ -802,5 +802,5 @@
 			(*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT;
 			fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject",
-					ahdr->avp_value->u32, sidlen, sid);
+					ahdr->avp_value->u32, (int)sidlen, sid);
 			return 0;
 	}
