Index: nss/lib/util/quickder.c |
diff --git a/nss/lib/util/quickder.c b/nss/lib/util/quickder.c |
index f9776bb9d581c8e816204651545b26fa2aff3ef8..fe72b293a9eaff14b5001c3c29717830910ce4e3 100644 |
--- a/nss/lib/util/quickder.c |
+++ b/nss/lib/util/quickder.c |
@@ -146,7 +146,7 @@ static SECStatus GetItem(SECItem* src, SECItem* dest, PRBool includeTag) |
PORT_SetError(SEC_ERROR_BAD_DER); |
return SECFailure; |
} |
- src->len -= (dest->data - src->data) + dest->len; |
+ src->len -= (int)(dest->data - src->data) + dest->len; |
src->data = dest->data + dest->len; |
return SECSuccess; |
} |
@@ -270,13 +270,9 @@ static SECStatus MatchComponentType(const SEC_ASN1Template* templateEntry, |
if ( (tag & SEC_ASN1_CLASS_MASK) != |
(((unsigned char)kind) & SEC_ASN1_CLASS_MASK) ) |
{ |
-#ifdef DEBUG |
/* this is only to help debugging of the decoder in case of problems */ |
- unsigned char tagclass = tag & SEC_ASN1_CLASS_MASK; |
- unsigned char expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK; |
- tagclass = tagclass; |
- expectedclass = expectedclass; |
-#endif |
+ /* unsigned char tagclass = tag & SEC_ASN1_CLASS_MASK; */ |
+ /* unsigned char expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK; */ |
*match = PR_FALSE; |
return SECSuccess; |
} |
@@ -657,13 +653,12 @@ static SECStatus DecodeItem(void* dest, |
{ |
SECStatus rv = SECSuccess; |
SECItem temp; |
- SECItem mark; |
+ SECItem mark = {siBuffer, NULL, 0}; |
PRBool pop = PR_FALSE; |
PRBool decode = PR_TRUE; |
PRBool save = PR_FALSE; |
unsigned long kind; |
PRBool match = PR_TRUE; |
- PRBool optional = PR_FALSE; |
PR_ASSERT(src && dest && templateEntry && arena); |
#if 0 |
@@ -678,7 +673,6 @@ static SECStatus DecodeItem(void* dest, |
{ |
/* do the template validation */ |
kind = templateEntry->kind; |
- optional = (0 != (kind & SEC_ASN1_OPTIONAL)); |
if (!kind) |
{ |
PORT_SetError(SEC_ERROR_BAD_TEMPLATE); |