From 0abc84f6885964ded1a63283c51110bbaefab04a Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Fri, 19 Feb 1999 16:12:58 +0000 Subject: [PATCH] move local variables into #if block where they are needed (reduces warnings on Macintosh compiler) git-svn-id: svn://10.0.0.236/trunk@21309 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/caps/src/nsPrincipal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/caps/src/nsPrincipal.cpp b/mozilla/caps/src/nsPrincipal.cpp index b22bf882111..679757dbfc8 100755 --- a/mozilla/caps/src/nsPrincipal.cpp +++ b/mozilla/caps/src/nsPrincipal.cpp @@ -729,7 +729,6 @@ PRInt32 nsPrincipal::computeHashCode(void) char * nsPrincipal::saveCert(void) { - int result; if (itsType == nsPrincipalType_CertChain) { return NULL; } @@ -738,6 +737,7 @@ char * nsPrincipal::saveCert(void) } #ifdef MOZ_SECURITY + int result; result = SOB_stash_cert((ZIG *)itsZig, itsKeyLen, itsKey); if (result < 0) { return SOB_get_error(result); @@ -751,8 +751,6 @@ char * nsPrincipal::saveCert(void) char * nsPrincipal::getCertAttribute(int attrib) { - void *result; - unsigned long length; char *attrStr = "Untrusted certificate (unknown attributes)"; ZIG *zig = NULL; @@ -799,6 +797,8 @@ nsPrincipal::getCertAttribute(int attrib) } #ifdef MOZ_SECURITY + void *result; + unsigned long length; if (SOB_cert_attribute(attrib, zig, itsKeyLen, itsKey, &result, &length) < 0) {