From: Ludovic Courtès Date: Sun, 20 Sep 2009 22:10:28 +0000 (+0200) Subject: Remove unused variables in ice-9/goops/srfi/scripts. X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/a2ca7252121e968798b0638b758ea99d7bf62409 Remove unused variables in ice-9/goops/srfi/scripts. * module/ice-9/boot-9.scm (scm-style-repl)[-abort]: Remove. * module/oop/goops.scm (class)[slot-defs]: Remove. (compute-slot-accessors)[name]: Remove. (compute-get-n-set)[env]: Remove. * module/oop/goops/active-slot.scm (compute-get-n-set)[env, name]: Remove. * module/oop/goops/dispatch.scm (cache-try-hash!)[max-misses]: Remove. * module/oop/goops/save.scm (make-mapper)[dims]: Remove. * module/scripts/autofrisk.scm (>>checks)[prog]: Remove. * module/srfi/srfi-19.scm (priv:read-directives)[ireaderf, eireader4]: Remove. --- diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index b1bc3c929..a1537d16c 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2811,15 +2811,7 @@ module '(ice-9 q) '(make-q q-length))}." (display ";;; QUIT executed, repl exitting") (newline) (repl-report))) - args)) - - (-abort (lambda () - (if scm-repl-verbose - (begin - (display ";;; ABORT executed.") - (newline) - (repl-report))) - (repl -read -eval -print)))) + args))) (let ((status (error-catching-repl -read -eval diff --git a/module/oop/goops.scm b/module/oop/goops.scm index c1754da3e..a47c4eee9 100644 --- a/module/oop/goops.scm +++ b/module/oop/goops.scm @@ -1,6 +1,6 @@ ;;; installed-scm-file -;;;; Copyright (C) 1998,1999,2000,2001,2002, 2003, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 1998,1999,2000,2001,2002, 2003, 2006, 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -226,8 +226,7 @@ slots)) (if (not (list? supers)) (goops-error "malformed superclass list: ~S" supers)) - (let ((slot-defs (cons #f '())) - (slots (take-while (lambda (x) (not (keyword? x))) slots)) + (let ((slots (take-while (lambda (x) (not (keyword? x))) slots)) (options (or (find-tail keyword? slots) '()))) `(make-class ;; evaluate super class variables @@ -1074,8 +1073,7 @@ (define (compute-slot-accessors class slots env) (for-each (lambda (s g-n-s) - (let ((name (slot-definition-name s)) - (getter-function (slot-definition-getter s)) + (let ((getter-function (slot-definition-getter s)) (setter-function (slot-definition-setter s)) (accessor (slot-definition-accessor s))) (if getter-function @@ -1412,8 +1410,7 @@ ((#:virtual) ;; No allocation ;; slot-ref and slot-set! function must be given by the user (let ((get (get-keyword #:slot-ref (slot-definition-options s) #f)) - (set (get-keyword #:slot-set! (slot-definition-options s) #f)) - (env (class-environment class))) + (set (get-keyword #:slot-set! (slot-definition-options s) #f))) (if (not (and get set)) (goops-error "You must supply a #:slot-ref and a #:slot-set! in ~S" s)) diff --git a/module/oop/goops/active-slot.scm b/module/oop/goops/active-slot.scm index 5cd2afe10..79aa1b3f2 100644 --- a/module/oop/goops/active-slot.scm +++ b/module/oop/goops/active-slot.scm @@ -1,6 +1,6 @@ ;;; installed-scm-file -;;;; Copyright (C) 1999, 2001, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001, 2006, 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -34,9 +34,7 @@ (define-method (compute-get-n-set (class ) slot) (if (eq? (slot-definition-allocation slot) #:active) (let* ((index (slot-ref class 'nfields)) - (name (car slot)) (s (cdr slot)) - (env (class-environment class)) (before-ref (get-keyword #:before-slot-ref s #f)) (after-ref (get-keyword #:after-slot-ref s #f)) (before-set! (get-keyword #:before-slot-set! s #f)) diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm index 0dd169d59..88abf8045 100644 --- a/module/oop/goops/dispatch.scm +++ b/module/oop/goops/dispatch.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006, 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -186,8 +186,7 @@ (set! sum (+ sum (struct-ref (car classes) hashset-index)))))) (define (cache-try-hash! min-misses hashset cache entries) - (let ((max-misses 0) - (mask (- (vector-length cache) 1))) + (let ((mask (- (vector-length cache) 1))) (let outer ((in entries) (max-misses 0)) (if (null? in) max-misses diff --git a/module/oop/goops/save.scm b/module/oop/goops/save.scm index 0c7d71a2d..b500a0c32 100644 --- a/module/oop/goops/save.scm +++ b/module/oop/goops/save.scm @@ -1,6 +1,6 @@ ;;; installed-scm-file -;;;; Copyright (C) 2000,2001,2002, 2006 Free Software Foundation, Inc. +;;;; Copyright (C) 2000,2001,2002, 2006, 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -183,8 +183,7 @@ (enumerate-component! (shared-array-root o) env)) (define (make-mapper array) - (let* ((dims (array-dimensions array)) - (n (array-rank array)) + (let* ((n (array-rank array)) (indices (reverse (if (<= n 11) (list-tail '(t s r q p n m l k j i) (- 11 n)) (let loop ((n n) diff --git a/module/scripts/autofrisk.scm b/module/scripts/autofrisk.scm index e29ccc992..943c90227 100644 --- a/module/scripts/autofrisk.scm +++ b/module/scripts/autofrisk.scm @@ -1,6 +1,6 @@ ;;; autofrisk --- Generate module checks for use with auto* tools -;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License @@ -157,7 +157,6 @@ (files (apply append (map unglob (cfg 'files-glob)))) (ncx (cfg 'non-critical-external)) (nci (cfg 'non-critical-internal)) - (prog (cfg 'non-critical)) (report ((make-frisker) files)) (external (report 'external))) (let ((pww-varname (cfg 'pww-varname))) diff --git a/module/srfi/srfi-19.scm b/module/srfi/srfi-19.scm index b91824976..ba13c03a0 100644 --- a/module/srfi/srfi-19.scm +++ b/module/srfi/srfi-19.scm @@ -1,6 +1,6 @@ ;;; srfi-19.scm --- Time/Date Library -;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -1345,9 +1345,7 @@ (define priv:read-directives (let ((ireader4 (priv:make-integer-reader 4)) (ireader2 (priv:make-integer-reader 2)) - (ireaderf (priv:make-integer-reader #f)) (eireader2 (priv:make-integer-exact-reader 2)) - (eireader4 (priv:make-integer-exact-reader 4)) (locale-reader-abbr-weekday (priv:make-locale-reader priv:locale-abbr-weekday->index)) (locale-reader-long-weekday (priv:make-locale-reader