File: Remove-unused-variable-2.patch

package info (click to toggle)
xml-security-c 1.7.3-4%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,096 kB
  • sloc: cpp: 47,259; sh: 4,123; makefile: 503
file content (86 lines) | stat: -rw-r--r-- 2,759 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Sun, 31 Jan 2016 00:50:48 +0100
Subject: Remove unused variable 2

---
 xsec/tools/xtest/xtest.cpp | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/xsec/tools/xtest/xtest.cpp b/xsec/tools/xtest/xtest.cpp
index ec40cb2..d8f4c6c 100644
--- a/xsec/tools/xtest/xtest.cpp
+++ b/xsec/tools/xtest/xtest.cpp
@@ -985,7 +985,6 @@ void unitTestRSASig(DOMImplementation * impl, XSECCryptoKeyRSA * k, const XMLCh
 		XSECProvider prov;
 		DSIGSignature *sig;
 		DOMElement *sigNode;
-		DSIGReference *ref[4];
 		
 		sig = prov.newSignature();
 		sig->setDSIGNSPrefix(MAKE_UNICODE_STRING("ds"));
@@ -1005,10 +1004,6 @@ void unitTestRSASig(DOMImplementation * impl, XSECCryptoKeyRSA * k, const XMLCh
 		DOMText * txt= doc->createTextNode(MAKE_UNICODE_STRING("A test string"));
 		obj->appendChild(txt);
 
-		// Add a Reference
-		ref[0] = sig->createReference(MAKE_UNICODE_STRING("#ObjectId"), 
-			DSIGConstants::s_unicodeStrURISHA1);
-
 		// Get a key
 		cerr << "signing ... ";
 
@@ -2545,7 +2540,6 @@ int main(int argc, char **argv) {
 	bool		doEncryptionUnitTests = true;
 	bool		doSignatureTest = true;
 	bool		doSignatureUnitTests = true;
-	bool		doXKMSTest = true;
 
 	int paramCount = 1;
 
@@ -2576,28 +2570,24 @@ int main(int argc, char **argv) {
 			doEncryptionTest = false;
 			doEncryptionUnitTests = false;
 			doSignatureUnitTests = false;
-			doXKMSTest = false;
 			paramCount++;
 		}
 		else if (_stricmp(argv[paramCount], "--encryption-only") == 0 || _stricmp(argv[paramCount], "-e") == 0) {
 			doSignatureTest = false;
 			doEncryptionUnitTests = false;
 			doSignatureUnitTests = false;
-			doXKMSTest = false;
 			paramCount++;
 		}
 		else if (_stricmp(argv[paramCount], "--encryption-unit-only") == 0 || _stricmp(argv[paramCount], "-u") == 0) {
 			doEncryptionTest = false;
 			doSignatureTest = false;
 			doSignatureUnitTests = false;
-			doXKMSTest = false;
 			paramCount++;
 		}
 		else if (_stricmp(argv[paramCount], "--signature-unit-only") == 0 || _stricmp(argv[paramCount], "-t") == 0) {
 			doEncryptionTest = false;
 			doSignatureTest = false;
 			doEncryptionUnitTests = false;
-			doXKMSTest = false;
 			paramCount++;
 		}
 /*		else if (stricmp(argv[paramCount], "--xkms-only") == 0 || stricmp(argv[paramCount], "-x") == 0) {
@@ -2723,17 +2713,6 @@ int main(int argc, char **argv) {
 
 			unitTestEncrypt(impl);
 		}
-/*
-		// Running XKMS Base test
-		if (doXKMSTest) {
-			cerr << endl << "====================================";
-			cerr << endl << "Performing XKMS Function";
-			cerr << endl << "====================================";
-			cerr << endl << endl;
-
-			testXKMS(impl);
-		}
-*/
 		cerr << endl << "All tests passed" << endl;
 
 	}