diff libfdproto/ostr.c @ 1027:0117a7746b21

Fix a number of errors and warnings introduced/highlighted by recent commits
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 15 Apr 2013 15:17:07 +0800
parents 9beef9a09faa
children b95e2b9b78d8
line wrap: on
line diff
--- a/libfdproto/ostr.c	Sat Apr 13 22:18:05 2013 +0200
+++ b/libfdproto/ostr.c	Mon Apr 15 15:17:07 2013 +0800
@@ -169,10 +169,10 @@
 			goto disp;
 		}
 		/* otherwise, we just display the hex code */
-		TRACE_DEBUG(INFO, "Invalid character (0x%hhX) at offset %d in DiameterIdentity '%.*s'", os[i], i+1, ossz, os);
+		TRACE_DEBUG(INFO, "Invalid character (0x%hhX) at offset %d in DiameterIdentity '%.*s'", os[i], i+1, (int)ossz, os);
 		return 0;
 disp:
-		TRACE_DEBUG(INFO, "Invalid character '%.*s' at offset %d in DiameterIdentity '%.*s'", nb, os + i, i+1, ossz, os);
+		TRACE_DEBUG(INFO, "Invalid character '%.*s' at offset %d in DiameterIdentity '%.*s'", nb, os + i, i+1, (int)ossz, os);
 		return 0;
 	}
 	
@@ -290,7 +290,7 @@
 	
 	/* Remaining of URI marker */
 	if (memcmp( uri + offset, "://", 3)) {
-		TRACE_DEBUG(INFO, "Invalid DiameterURI prefix: got '%.*s', expected 'aaa://' or 'aaas://'", offset + 3, uri);
+		TRACE_DEBUG(INFO, "Invalid DiameterURI prefix: got '%.*s', expected 'aaa://' or 'aaas://'", (int)offset + 3, uri);
 		return EINVAL;
 	}
 	offset += 3;
@@ -379,7 +379,7 @@
 			goto after_transport;
 		}
 		
-		TRACE_DEBUG(INFO, "Invalid DiameterURI: transport string is not recognized ('%.*s').", urisz - offset, uri + offset);
+		TRACE_DEBUG(INFO, "Invalid DiameterURI: transport string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset);
 		return EINVAL;
 	}
 after_transport:
@@ -416,7 +416,7 @@
 			goto after_proto;
 		}
 		
-		TRACE_DEBUG(INFO, "Invalid DiameterURI: protocol string is not recognized ('%.*s').", urisz - offset, uri + offset);
+		TRACE_DEBUG(INFO, "Invalid DiameterURI: protocol string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset);
 		return EINVAL;
 		
 	}
@@ -424,7 +424,7 @@
 	if (offset == urisz)
 		return 0; /* Finished */
 	
-	TRACE_DEBUG(INFO, "Invalid DiameterURI: final part of string is not recognized ('%.*s').", urisz - offset, uri + offset);
+	TRACE_DEBUG(INFO, "Invalid DiameterURI: final part of string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset);
 	return EINVAL;
 }
 
"Welcome to our mercurial repository"