diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-05-09 17:38:24 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-05-09 18:08:45 +0100 |
commit | 8836aca9a03b99fc6f0ceb3994dbb78d442d634a (patch) | |
tree | 1656f52c651e119559deeb9c8794e4db96cccc26 /toolbin | |
parent | 8620f18686d3350590894590264f4cd71ef3dccb (diff) | |
download | ghostpdl-8836aca9a03b99fc6f0ceb3994dbb78d442d634a.tar.gz |
lgtm.com: Miscellaneous fixes in support scripts.
Remove unused local variables, correct semicolon usage. Avoid
"return fn()" where fn always returns None.
Diffstat (limited to 'toolbin')
-rwxr-xr-x | toolbin/gitlog2changelog.py | 4 | ||||
-rw-r--r-- | toolbin/halftone/ETS/ipview.html | 4 | ||||
-rwxr-xr-x | toolbin/ocheck.py | 11 |
3 files changed, 9 insertions, 10 deletions
diff --git a/toolbin/gitlog2changelog.py b/toolbin/gitlog2changelog.py index 3967dd7d2..2b4642536 100755 --- a/toolbin/gitlog2changelog.py +++ b/toolbin/gitlog2changelog.py @@ -19,10 +19,6 @@ import os import sys -import string -import datetime -import time -import codecs argc = len(sys.argv) if argc < 3: diff --git a/toolbin/halftone/ETS/ipview.html b/toolbin/halftone/ETS/ipview.html index 8a2a6e709..2b7d57d0a 100644 --- a/toolbin/halftone/ETS/ipview.html +++ b/toolbin/halftone/ETS/ipview.html @@ -43,7 +43,7 @@ imageDataBlock.prototype.updateImage = function() var x, y, z; var R, G, B; var p = this.pos; - var canvas = this.canvas.getContext("2d") + var canvas = this.canvas.getContext("2d"); var id = canvas.getImageData(0, 0, w, h); var q = 0; @@ -85,7 +85,7 @@ imageDataBlock.prototype.updateImage = function() else { var fwd = w*h; - var back = w*h*d-1 + var back = w*h*d-1; for (y = h; y > 0; y--) { for (x = w; x > 0; x--) diff --git a/toolbin/ocheck.py b/toolbin/ocheck.py index 99de875a1..fc4a80dd3 100755 --- a/toolbin/ocheck.py +++ b/toolbin/ocheck.py @@ -251,9 +251,9 @@ def forfts(args, defs, refs, proc, verbose): fmods = dict([(m, 1) for m in fmods]) if tm or not ts: # neither tm nor ts = all tm = re.compile(tm) - tmods = dict([(m, 1) for m in defmods if tm.match(m)]) + #tmods = dict([(m, 1) for m in defmods if tm.match(m)]) else: - tmods = None + #tmods = None # ****** fs IS BOGUS, USES ENTIRE MODULE ****** if fs: fs = re.compile(fs) @@ -306,7 +306,9 @@ def main(argv): cwd = args.pop(0) else: cwd = '' - if len(args) < 1: return usage() + if len(args) < 1: + usage() + return verbose = False # Read the ld script and each file's symbol table. ldscript = args.pop(0) @@ -381,7 +383,8 @@ def main(argv): elif arg == '--verbose': verbose = True else: - return usage() + usage() + return if __name__ == '__main__': sys.exit(main(sys.argv) or 0) |