bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33314: 27.0.50; wrong compiler warning


From: Noam Postavsky
Subject: bug#33314: 27.0.50; wrong compiler warning
Date: Thu, 08 Nov 2018 20:11:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

tags 33314 unreproducible moreinfo
quit

Andreas Röhler <andreas.roehler@online.de> writes:

> So regexpvalue is used too. May send the complete function if interested.

Please do, I can't reproduce the warning you claimed in your original
report (and frankly, I think you've been doing this long enough that you
should know by now that such an abbreviated report is not very helpful).

Trying to fill in your example like this:

    ;;; -*- lexical-binding: t -*-

    (defun foo (regexp &optional something)
       "..."
       (unless (bobp)
         (when (empty-line-p) (skip-chars-backward " \t\r\n\f"))
         (let* ((orig (point))
                (regexpvalue (if (eq regexp 'py-clause-re)
                                 (symbol-value
                                  'py-extended-block-or-clause-re)
                               (symbol-value regexp))))
           t)))

gives

    bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable 
‘regexpvalue’
    bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable ‘orig’
    bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical argument ‘something’

    In end of data:
    bug-33314-bcomp-warning.el:13:1:Warning: the function ‘empty-line-p’ is not
        known to be defined.

`regexp' is not mentioned, but the other unused variables are, as
expected.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]