unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master updated (4b1ab18391 -> 8517d1e9aa)
       [not found] <166067551220.16571.3552675760321814129@vcs2.savannah.gnu.org>
@ 2022-08-17 11:13 ` Stefan Kangas
  2022-08-17 11:45   ` Mattias Engdegård
  2022-08-17 17:27   ` Basil L. Contovounesios
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Kangas @ 2022-08-17 11:13 UTC (permalink / raw)
  To: Mattias Engdegård, emacs-devel

Mattias Engdegård <mattiase@acm.org> writes:

> mattiase pushed a change to branch master.
>
>       from  4b1ab18391 Fix autoload in tramp.el
>        new  869db699ee Improved static detection of nil and non-nil expressions
>        new  e618b6faee Improved `if` and `while` optimisation
>        new  621550c076 Improved `and` and `or` optimisation
>        new  fb98c4a406 Improved `null` (alias `not`) optimisation
>        new  8517d1e9aa * lisp/dired.el (dired-mark-if): Evaluate MSG once to avoid warning.

Thanks!  I enjoy reading these patchsets with improvements to the byte
compiler.

The above seems to lead some warnings that, at a glance, I wasn't
immediately sure weren't false positives:

In battery-linux-proc-apm:
battery.el:372:19: Warning: value returned from (logand tem 2) is unused
battery.el:375:19: Warning: value returned from (logand tem 16) is unused
battery.el:372:19: Warning: value returned from (logand tem 2) is unused
battery.el:375:19: Warning: value returned from (logand tem 16) is unused

In edmacro-sanitize-for-string:
edmacro.el:629:19: Warning: value returned from (logand (aref seq i)
128) is unused
edmacro.el:629:19: Warning: value returned from (logand (aref seq i)
128) is unused

In reb-fontify-string-re:
emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
'font-lock-string-face face) is unused
emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
'font-lock-string-face face) is unused
emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
'font-lock-string-face face) is unused

In c-enclosing-c++-attribute:
progmodes/cc-engine.el:1960:37: Warning: value returned from (min (+
(point) 200) (point-max)) is unused
progmodes/cc-engine.el:1960:37: Warning: value returned from (min (+
(point) 200) (point-max)) is unused

In c-get-fontification-context:
progmodes/cc-fonts.el:1266:43: Warning: value returned from (max (-
(point) 2000) (point-min)) is unused



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master updated (4b1ab18391 -> 8517d1e9aa)
  2022-08-17 11:13 ` master updated (4b1ab18391 -> 8517d1e9aa) Stefan Kangas
@ 2022-08-17 11:45   ` Mattias Engdegård
  2022-08-17 17:27   ` Basil L. Contovounesios
  1 sibling, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2022-08-17 11:45 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

17 aug. 2022 kl. 13.13 skrev Stefan Kangas <stefankangas@gmail.com>:

> The above seems to lead some warnings that, at a glance, I wasn't
> immediately sure weren't false positives

They either indicate actual bugs or minor inefficiencies, and can all easily be dealt with.

I usually prefer letting those most familiar with the code, typically the authors or maintainers, to fix warnings for several reasons. In particular they are more likely to rectify underlying errors instead of just 'fixing the warning', and may know about similarly flawed code that wasn't warned about. If the warning indicated a misunderstanding of how the language or system works, he or she will also have an opportunity to learn.

This doesn't mean I won't help if asked, very much the contrary!

(As you can see, several of the warnings are duplicated; that's an old problem that should probably be fixed one day.)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master updated (4b1ab18391 -> 8517d1e9aa)
  2022-08-17 11:13 ` master updated (4b1ab18391 -> 8517d1e9aa) Stefan Kangas
  2022-08-17 11:45   ` Mattias Engdegård
@ 2022-08-17 17:27   ` Basil L. Contovounesios
  2022-08-19 12:00     ` Mattias Engdegård
  1 sibling, 1 reply; 4+ messages in thread
From: Basil L. Contovounesios @ 2022-08-17 17:27 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Mattias Engdegård, emacs-devel, Lennart Borgman

Stefan Kangas [2022-08-17 04:13 -0700] wrote:

> The above seems to lead some warnings that, at a glance, I wasn't
> immediately sure weren't false positives:
>
> In battery-linux-proc-apm:
> battery.el:372:19: Warning: value returned from (logand tem 2) is unused
> battery.el:375:19: Warning: value returned from (logand tem 16) is unused
> battery.el:372:19: Warning: value returned from (logand tem 2) is unused
> battery.el:375:19: Warning: value returned from (logand tem 16) is unused

I took the liberty of fixing these C-isms (falla-Cs?):

Fix Linux APM BIOS flag testing in battery.el
31f289625c 2022-08-17 20:11:25 +0300
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=31f289625c

> In edmacro-sanitize-for-string:
> edmacro.el:629:19: Warning: value returned from (logand (aref seq i)
> 128) is unused
> edmacro.el:629:19: Warning: value returned from (logand (aref seq i)
> 128) is unused

I leave this similar falla-C for someone else.

> In reb-fontify-string-re:
> emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
> 'font-lock-string-face face) is unused
> emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
> 'font-lock-string-face face) is unused
> emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
> 'font-lock-string-face face) is unused

This one's curious: the entire surrounding (or ...) expression always
evals to non-nil.  Lennart?

> In c-enclosing-c++-attribute:
> progmodes/cc-engine.el:1960:37: Warning: value returned from (min (+
> (point) 200) (point-max)) is unused
> progmodes/cc-engine.el:1960:37: Warning: value returned from (min (+
> (point) 200) (point-max)) is unused
>
> In c-get-fontification-context:
> progmodes/cc-fonts.el:1266:43: Warning: value returned from (max (-
> (point) 2000) (point-min)) is unused

I leave these non-falla-CCs for someone else.

Thanks,

-- 
Basil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master updated (4b1ab18391 -> 8517d1e9aa)
  2022-08-17 17:27   ` Basil L. Contovounesios
@ 2022-08-19 12:00     ` Mattias Engdegård
  0 siblings, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2022-08-19 12:00 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Stefan Kangas, emacs-devel, Lennart Borgman

17 aug. 2022 kl. 19.27 skrev Basil L. Contovounesios <contovob@tcd.ie>:

> I took the liberty of fixing these C-isms (falla-Cs?):

Thank you!

>> edmacro.el:629:19: Warning: value returned from (logand (aref seq i)
>> 128) is unused
> 
> I leave this similar falla-C for someone else.

Did it myself after some hesitating, but the stakes are low in this case.

>> emacs-lisp/re-builder.el:739:29: Warning: value returned from (memq
>> 'font-lock-string-face face) is unused
> 
> This one's curious: the entire surrounding (or ...) expression always
> evals to non-nil.  Lennart?

That (or ... t) looks like debugging code left in by mistake, but who knows.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-19 12:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <166067551220.16571.3552675760321814129@vcs2.savannah.gnu.org>
2022-08-17 11:13 ` master updated (4b1ab18391 -> 8517d1e9aa) Stefan Kangas
2022-08-17 11:45   ` Mattias Engdegård
2022-08-17 17:27   ` Basil L. Contovounesios
2022-08-19 12:00     ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).