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: Andreas Röhler
Subject: bug#33314: 27.0.50; wrong compiler warning
Date: Fri, 9 Nov 2018 09:35:04 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1



On 09.11.2018 02:11, Noam Postavsky wrote:
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.


Hmm, sorry, can't reproduce it any more. As this happens from time to time, should send a complete report indeed. Tried to replay for now, but couldn't find a saved state.

Thanks for your care,

Andreas





reply via email to

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