[xmlsec] fix compiler warnings



commit 49255cf481c3245159812c02d76e94e4eca8115a
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Tue Jul 14 11:26:24 2009 -0700

    fix compiler warnings

 src/gnutls/hmac.c  |    6 +++---
 src/nss/hmac.c     |    6 +++---
 src/openssl/hmac.c |    4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gnutls/hmac.c b/src/gnutls/hmac.c
index a983f2d..4957d89 100644
--- a/src/gnutls/hmac.c
+++ b/src/gnutls/hmac.c
@@ -212,10 +212,10 @@ xmlSecGnuTLSHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTr
 	   Otherwise, an attacker can set this lenght to 0 or very 
 	   small value
 	*/
-	if(ctx->dgstSize < xmlSecGnuTLSHmacGetMinOutputLength()) {
+	if((int)ctx->dgstSize < xmlSecGnuTLSHmacGetMinOutputLength()) {
  	   xmlSecError(XMLSEC_ERRORS_HERE,
 		    xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-		    xmlSecNodeHMACOutputLength,
+		    xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
 		    XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE,
 		    "HMAC output length is too small");
 	   return(-1);
@@ -227,7 +227,7 @@ xmlSecGnuTLSHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTr
     if(cur != NULL) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
 		    xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-		    xmlSecNodeGetName(cur),
+		    xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
 		    XMLSEC_ERRORS_R_INVALID_NODE,
 		    "no nodes expected");
 	return(-1);
diff --git a/src/nss/hmac.c b/src/nss/hmac.c
index e995758..4b7173d 100644
--- a/src/nss/hmac.c
+++ b/src/nss/hmac.c
@@ -196,10 +196,10 @@ xmlSecNssHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTrans
 	   Otherwise, an attacker can set this lenght to 0 or very 
 	   small value
 	*/
-	if(ctx->dgstSize < xmlSecNssHmacGetMinOutputLength()) {
+	if((int)ctx->dgstSize < xmlSecNssHmacGetMinOutputLength()) {
  	   xmlSecError(XMLSEC_ERRORS_HERE,
 		    xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-		    xmlSecNodeHMACOutputLength,
+		    xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
 		    XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE,
 		    "HMAC output length is too small");
 	   return(-1);
@@ -211,7 +211,7 @@ xmlSecNssHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTrans
     if(cur != NULL) {
 	xmlSecError(XMLSEC_ERRORS_HERE,
 		    xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-		    xmlSecNodeGetName(cur),
+		    xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),
 		    XMLSEC_ERRORS_R_INVALID_NODE,
 		    "no nodes expected");
 	return(-1);
diff --git a/src/openssl/hmac.c b/src/openssl/hmac.c
index 7698732..04766a9 100644
--- a/src/openssl/hmac.c
+++ b/src/openssl/hmac.c
@@ -274,10 +274,10 @@ xmlSecOpenSSLHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecT
 	   Otherwise, an attacker can set this lenght to 0 or very 
 	   small value
 	*/
-	if(ctx->dgstSize < xmlSecOpenSSLHmacGetMinOutputLength()) {
+	if((int)ctx->dgstSize < xmlSecOpenSSLHmacGetMinOutputLength()) {
  	   xmlSecError(XMLSEC_ERRORS_HERE,
 		    xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
-		    xmlSecNodeHMACOutputLength,
+		    xmlSecErrorsSafeString(xmlSecNodeGetName(cur)),		    
 		    XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE,
 		    "HMAC output length is too small");
 	   return(-1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]