* suggested patch for error flagged in static analysis
@ 2014-08-04 19:28 Miles Ohlrich
2014-08-04 20:53 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Miles Ohlrich @ 2014-08-04 19:28 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
I see this flagged as a "logical vs. bitwise operation" in my static analysis tool.
!CMF_FILE is always 0. Should be ~CMF_FILE.
--- zsh-5.0.5/Src/Zle/compctl.c.orig 2014-08-04 12:20:54.327001219 -0700
+++ zsh-5.0.5/Src/Zle/compctl.c 2014-08-04 12:21:41.079945543 -0700
@@ -3389,11 +3389,11 @@ makecomplistflags(Compctl cc, char *s, i
if (nonempty(l)) {
/* And add the resulting words. */
mflags |= CMF_FILE;
for (n = firstnode(l); n; incnode(n))
addmatch(getdata(n), NULL);
- mflags &= !CMF_FILE;
+ mflags &= ~CMF_FILE;
}
opts[NULLGLOB] = ng;
} else {
char **dirs = 0, *ta[2];
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: suggested patch for error flagged in static analysis
2014-08-04 19:28 suggested patch for error flagged in static analysis Miles Ohlrich
@ 2014-08-04 20:53 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2014-08-04 20:53 UTC (permalink / raw)
To: zsh-workers
On Aug 4, 7:28pm, Miles Ohlrich wrote:
}
} !CMF_FILE is always 0. Should be ~CMF_FILE.
}
} --- zsh-5.0.5/Src/Zle/compctl.c.orig 2014-08-04 12:20:54.327001219 -0700
} +++ zsh-5.0.5/Src/Zle/compctl.c 2014-08-04 12:21:41.079945543 -0700
Wow, compctl ? This is a really ancient bug. I wonder what the effect
was in practice ... it'll likely have almost no visible effect these days,
as compctl is all but unused.
Still, no reason not to commit it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-04 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 19:28 suggested patch for error flagged in static analysis Miles Ohlrich
2014-08-04 20:53 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).