Am 06.04.2025 um 03:24 schrieb Taylor R Campbell: >> Date: Sat, 5 Apr 2025 19:18:20 +0200 >> From: Roland Illig <roland.il...@gmx.de> >> >> Would it be narrow enough to add /*CONSTCOND*/ to the definition of >> ALIGNED_POINTER on i386 and amd64? Or would you consider this still too >> broad? > > Might be reasonable. But then we have a lot of predicates that might > be used in conditionals but be constant on some architectures, which > raises the question of which ones should be marked. > > I wonder how many real bugs -- true positives -- lint's > constant-condition warnings find.
I have no idea about that number, as I hope that these issues would have been fixed by now, before committing them. I looked at the remaining warnings, and more than 95% of them are useless, leaving at most 5% that are debatable. I didn't see a case where that warning pointed at an obvious bug. I'm fine disabling this check for lib/libc, or even entirely removing the check from lint, as it doesn't find all constant conditions but complains about many cases that are fine. The examples given in tests/usr.bin/xlint/lint1/msg_161.c are not convincing enough to keep this warning. Roland