[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lint warnings from `bison -y' generated files
From: |
Nicolas Joly |
Subject: |
lint warnings from `bison -y' generated files |
Date: |
Mon, 3 Oct 2005 14:43:11 +0200 |
User-agent: |
Mutt/1.5.8i |
Hi,
As a software developper, i often use lint(1) on my NetBSD workstation
to check my C source code for potential problems. One of my project
use multiple parsers and lexers to detect and parse biological
sequence formats.
While running lint on all .c files, i noticed that bison generated
files exhibit some lint warnings:
./align/clustaly.c:
align/clustaly.c(842): warning: expression has null effect [129]
align/clustaly.c(1023): warning: constant in conditional context [161]
align/clustaly.c(1023): warning: constant in conditional context [161]
align/clustaly.c(1024): warning: constant in conditional context [161]
align/clustaly.c(1024): warning: constant in conditional context [161]
align/clustaly.c(1358): warning: constant in conditional context [161]
I tracked them to various constructs:
- (void)yyvaluep; ... line 842.
- do {} while (0) ... lines 1023/1024.
- if (0) {} ... line 1358.
Except for the fisrt one, it should be easy to fix them by adding a
`/*CONSTCOND*/' lint directive.
As the code is not really under the developper control, i think that
most lint warnings should be avoided; like we try to do for compilers.
Thanks in advance,
Regards.
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.