[Pkg-javascript-commits] [node-asn1.js] 155/202: lib: remove unused variables and dead code

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:19:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-asn1.js.

commit f926439a2aed2317857c02e8e2e1aa39e3977ba2
Author: Felix Hanley <felix at userspace.com.au>
Date:   Wed Mar 30 15:40:09 2016 +1100

    lib: remove unused variables and dead code
---
 lib/asn1/base/node.js    | 6 ------
 lib/asn1/decoders/pem.js | 1 -
 lib/asn1/encoders/der.js | 1 -
 lib/asn1/encoders/pem.js | 2 --
 4 files changed, 10 deletions(-)

diff --git a/lib/asn1/base/node.js b/lib/asn1/base/node.js
index 0c196e8..80689f3 100644
--- a/lib/asn1/base/node.js
+++ b/lib/asn1/base/node.js
@@ -408,8 +408,6 @@ Node.prototype._decodeGeneric = function decodeGeneric(tag, input) {
     return this._getUse(state.use, input._reporterState.obj)._decode(input);
   else
     return input.error('unknown tag: ' + tag);
-
-  return null;
 };
 
 Node.prototype._getUse = function _getUse(entity, obj) {
@@ -485,7 +483,6 @@ Node.prototype._encodeValue = function encode(data, reporter, parent) {
     return state.children[0]._encode(data, reporter || new Reporter());
 
   var result = null;
-  var present = true;
 
   // Set reporter to share it with a child class
   this.reporter = reporter;
@@ -498,9 +495,6 @@ Node.prototype._encodeValue = function encode(data, reporter, parent) {
       return;
   }
 
-  // For error reporting
-  var prevKey;
-
   // Encode children first
   var content = null;
   var primitive = false;
diff --git a/lib/asn1/decoders/pem.js b/lib/asn1/decoders/pem.js
index a7d5225..301059c 100644
--- a/lib/asn1/decoders/pem.js
+++ b/lib/asn1/decoders/pem.js
@@ -1,7 +1,6 @@
 var inherits = require('inherits');
 var Buffer = require('buffer').Buffer;
 
-var asn1 = require('../../asn1');
 var DERDecoder = require('./der');
 
 function PEMDecoder(entity) {
diff --git a/lib/asn1/encoders/der.js b/lib/asn1/encoders/der.js
index fb0b39f..9b0dce6 100644
--- a/lib/asn1/encoders/der.js
+++ b/lib/asn1/encoders/der.js
@@ -3,7 +3,6 @@ var Buffer = require('buffer').Buffer;
 
 var asn1 = require('../../asn1');
 var base = asn1.base;
-var bignum = asn1.bignum;
 
 // Import DER constants
 var der = asn1.constants.der;
diff --git a/lib/asn1/encoders/pem.js b/lib/asn1/encoders/pem.js
index 40298b8..864271f 100644
--- a/lib/asn1/encoders/pem.js
+++ b/lib/asn1/encoders/pem.js
@@ -1,7 +1,5 @@
 var inherits = require('inherits');
-var Buffer = require('buffer').Buffer;
 
-var asn1 = require('../../asn1');
 var DEREncoder = require('./der');
 
 function PEMEncoder(entity) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-asn1.js.git



More information about the Pkg-javascript-commits mailing list