summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-09-13 13:06:31 -0700
committerTim Taubert <ttaubert@mozilla.com>2016-09-13 13:06:31 -0700
commit0d024efa19c3c2b90a5bc86e411ba724bf1f29ec (patch)
tree7b3ce7bb41c499d55108a9d0e17e2da6c33d14c6
parent2d8ba05a78ecd1ba4766d95ffc295213fa5db49e (diff)
downloadnss-hg-0d024efa19c3c2b90a5bc86e411ba724bf1f29ec.tar.gz
Bug 1302232 - Fix buildbot test failures complaining about #pragma inside a function r=bustage
-rw-r--r--lib/certhigh/ocsp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/certhigh/ocsp.c b/lib/certhigh/ocsp.c
index 40c56bb67..fc143f558 100644
--- a/lib/certhigh/ocsp.c
+++ b/lib/certhigh/ocsp.c
@@ -2195,6 +2195,10 @@ SetRequestExts(void *object, CERTCertExtension **exts)
request->tbsRequest->requestExtensions = exts;
}
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvarargs"
+#endif
SECStatus
CERT_AddOCSPAcceptableResponses(CERTOCSPRequest *request,
SECOidTag responseType0, ...)
@@ -2217,14 +2221,7 @@ CERT_AddOCSPAcceptableResponses(CERTOCSPRequest *request,
/* Count number of OIDS going into the extension value. */
count = 1;
if (responseType0 != SEC_OID_PKIX_OCSP_BASIC_RESPONSE) {
-#if defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wvarargs"
-#endif
va_start(ap, responseType0);
-#if defined(__GNUC__)
-#pragma GCC diagnostic pop
-#endif
va_copy(ap2, ap);
do {
count++;
@@ -2268,6 +2265,9 @@ loser:
(void)CERT_FinishExtensions(extHandle);
return rv;
}
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
/*
* FUNCTION: CERT_DestroyOCSPRequest