[Pkg-javascript-commits] [pdf.js] 12/414: Remove unused variables

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:00 UTC 2016


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

taffit pushed a commit to branch master
in repository pdf.js.

commit df81b832bb728cfcc11bd1aff9cb6e38c25e3a1c
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Wed Dec 16 22:31:30 2015 +0100

    Remove unused variables
---
 external/builder/test.js       |  1 -
 external/umdutils/verifier.js  |  3 ++-
 make.js                        |  9 ++++-----
 src/core/annotation.js         |  2 --
 src/core/function.js           |  2 +-
 src/core/jbig2.js              |  2 +-
 src/core/jpg.js                |  7 +------
 src/core/jpx.js                |  2 --
 src/display/canvas.js          | 10 +++++-----
 src/shared/global.js           |  2 +-
 web/overlay_manager.js         |  1 -
 web/pdf_document_properties.js |  2 +-
 web/view_history.js            |  1 -
 web/viewer.js                  |  2 +-
 14 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/external/builder/test.js b/external/builder/test.js
index 5a390ab..8d4007f 100644
--- a/external/builder/test.js
+++ b/external/builder/test.js
@@ -6,7 +6,6 @@ require('shelljs/make');
 
 var builder = require('./builder');
 var fs = require('fs');
-var path = require('path');
 
 var errors = 0;
 
diff --git a/external/umdutils/verifier.js b/external/umdutils/verifier.js
index 521e4e2..fc9f174 100644
--- a/external/umdutils/verifier.js
+++ b/external/umdutils/verifier.js
@@ -418,7 +418,8 @@ function validateDependencies(context) {
     if (!(i in nonRoots)) {
       context.infoCallback('Root module: ' + i);
     }
-  }}
+  }
+}
 
 /**
  * Validates all modules/files in the specified path. The modules must be
diff --git a/make.js b/make.js
index 6d08c56..2e66d0a 100644
--- a/make.js
+++ b/make.js
@@ -446,7 +446,7 @@ target.locale = function() {
 // Compresses cmap files. Ensure that Adobe cmap download and uncompressed at
 // ./external/cmaps location.
 //
-target.cmaps = function (args) {
+target.cmaps = function () {
   var CMAP_INPUT = 'external/cmaps';
   var VIEWER_CMAP_OUTPUT = 'external/bcmaps';
 
@@ -604,7 +604,7 @@ target.singlefile = function() {
 
 };
 
-function stripCommentHeaders(content, filename) {
+function stripCommentHeaders(content) {
   var notEndOfComment = '(?:[^*]|\\*(?!/))+';
   var reg = new RegExp(
     '\n/\\* Copyright' + notEndOfComment + '\\*/\\s*' +
@@ -617,7 +617,7 @@ function stripCommentHeaders(content, filename) {
 function cleanupJSSource(file) {
   var content = cat(file);
 
-  content = stripCommentHeaders(content, file);
+  content = stripCommentHeaders(content);
 
   content.to(file);
 }
@@ -1284,8 +1284,7 @@ target.botmakeref = function() {
   echo();
   echo('### Creating reference images');
 
-  var PDF_TEST = env['PDF_TEST'] || 'test_manifest.json',
-      PDF_BROWSERS = env['PDF_BROWSERS'] ||
+  var PDF_BROWSERS = env['PDF_BROWSERS'] ||
                      'resources/browser_manifests/browser_manifest.json';
 
   if (!test('-f', 'test/' + PDF_BROWSERS)) {
diff --git a/src/core/annotation.js b/src/core/annotation.js
index 8da90de..f09affc 100644
--- a/src/core/annotation.js
+++ b/src/core/annotation.js
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals PDFJS */
 
 'use strict';
 
@@ -46,7 +45,6 @@ var stringToPDFString = sharedUtil.stringToPDFString;
 var stringToUTF8String = sharedUtil.stringToUTF8String;
 var warn = sharedUtil.warn;
 var Dict = corePrimitives.Dict;
-var Name = corePrimitives.Name;
 var isDict = corePrimitives.isDict;
 var isName = corePrimitives.isName;
 var Stream = coreStream.Stream;
diff --git a/src/core/function.js b/src/core/function.js
index d7b7cfd..3a29017 100644
--- a/src/core/function.js
+++ b/src/core/function.js
@@ -987,7 +987,7 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
       var instructions = [];
       var inputSize = domain.length >> 1, outputSize = range.length >> 1;
       var lastRegister = 0;
-      var n, j, min, max;
+      var n, j;
       var num1, num2, ast1, ast2, tmpVar, item;
       for (i = 0; i < inputSize; i++) {
         stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1]));
diff --git a/src/core/jbig2.js b/src/core/jbig2.js
index de12341..6478111 100644
--- a/src/core/jbig2.js
+++ b/src/core/jbig2.js
@@ -889,7 +889,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
           delete pageInfo.height;
         }
         var pageSegmentFlags = data[position + 16];
-        var pageStripingInformatiom = readUint16(data, position + 17);
+        var pageStripingInformation = readUint16(data, position + 17);
         pageInfo.lossless = !!(pageSegmentFlags & 1);
         pageInfo.refinement = !!(pageSegmentFlags & 2);
         pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1;
diff --git a/src/core/jpg.js b/src/core/jpg.js
index 1d8b25f..9840052 100644
--- a/src/core/jpg.js
+++ b/src/core/jpg.js
@@ -109,12 +109,8 @@ var JpegImage = (function jpegImage() {
 
   function decodeScan(data, offset, frame, components, resetInterval,
                       spectralStart, spectralEnd, successivePrev, successive) {
-    var precision = frame.precision;
-    var samplesPerLine = frame.samplesPerLine;
-    var scanLines = frame.scanLines;
     var mcusPerLine = frame.mcusPerLine;
     var progressive = frame.progressive;
-    var maxH = frame.maxH, maxV = frame.maxV;
 
     var startOffset = offset, bitsData = 0, bitsCount = 0;
 
@@ -622,10 +618,9 @@ var JpegImage = (function jpegImage() {
         frame.mcusPerColumn = mcusPerColumn;
       }
 
-      var offset = 0, length = data.length;
+      var offset = 0;
       var jfif = null;
       var adobe = null;
-      var pixels = null;
       var frame, resetInterval;
       var quantizationTables = [];
       var huffmanTablesAC = [], huffmanTablesDC = [];
diff --git a/src/core/jpx.js b/src/core/jpx.js
index 2f2fde8..96ac153 100644
--- a/src/core/jpx.js
+++ b/src/core/jpx.js
@@ -85,8 +85,6 @@ var JpxImage = (function JpxImageClosure() {
           case 0x636F6C72: // 'colr'
             // Colorspaces are not used, the CS from the PDF is used.
             var method = data[position];
-            var precedence = data[position + 1];
-            var approximation = data[position + 2];
             if (method === 1) {
               // enumerated colorspace
               var colorspace = readUint32(data, position + 3);
diff --git a/src/display/canvas.js b/src/display/canvas.js
index f55ad4b..8f058d1 100644
--- a/src/display/canvas.js
+++ b/src/display/canvas.js
@@ -2201,11 +2201,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       return this.cachedGetSinglePixelWidth;
     },
     getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {
-        var transform = this.ctx.mozCurrentTransform;
-        return [
-          transform[0] * x + transform[2] * y + transform[4],
-          transform[1] * x + transform[3] * y + transform[5]
-        ];
+      var transform = this.ctx.mozCurrentTransform;
+      return [
+        transform[0] * x + transform[2] * y + transform[4],
+        transform[1] * x + transform[3] * y + transform[5]
+      ];
     }
   };
 
diff --git a/src/shared/global.js b/src/shared/global.js
index 2492b07..219afe3 100644
--- a/src/shared/global.js
+++ b/src/shared/global.js
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals PDFJS, global */
+/* globals global */
 
 'use strict';
 
diff --git a/web/overlay_manager.js b/web/overlay_manager.js
index 362f549..56b23ab 100644
--- a/web/overlay_manager.js
+++ b/web/overlay_manager.js
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals Promise */
 
 'use strict';
 
diff --git a/web/pdf_document_properties.js b/web/pdf_document_properties.js
index 5d0e74a..73444b3 100644
--- a/web/pdf_document_properties.js
+++ b/web/pdf_document_properties.js
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals Promise, mozL10n, getPDFFileNameFromURL, OverlayManager */
+/* globals mozL10n, getPDFFileNameFromURL, OverlayManager */
 
 'use strict';
 
diff --git a/web/view_history.js b/web/view_history.js
index e6cdc16..346d39b 100644
--- a/web/view_history.js
+++ b/web/view_history.js
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals PDFJS, Promise */
 
 'use strict';
 
diff --git a/web/viewer.js b/web/viewer.js
index c8d1dda..6151a90 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -12,7 +12,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, ProgressBar,
+/* globals PDFJS, PDFBug, FirefoxCom, Stats, ProgressBar,
            DownloadManager, getFileName, getPDFFileNameFromURL,
            PDFHistory, Preferences, SidebarView, ViewHistory, Stats,
            PDFThumbnailViewer, URL, noContextMenuHandler, SecondaryToolbar,

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



More information about the Pkg-javascript-commits mailing list