home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!cs.kun.nl!hansm
- From: hansm@cs.kun.nl (Hans Mulder)
- Subject: I disagree with lint(1)
- Message-ID: <1992Sep7.083401.2587@sci.kun.nl>
- Summary: Lint(1) says this is wrong. Is it?
- Keywords: lint, classic C
- Sender: news@sci.kun.nl (NUnet News Owner)
- Organization: University of Nijmegen, The Netherlands
- Date: Mon, 7 Sep 1992 08:34:01 GMT
- Lines: 37
-
- Hello C gurus,
-
- I just asked lint(1)'s opinion on this piece of code:
-
- typedef struct foo *bar;
-
- fun(b)
- bar b;
- {
- b=b;
- }
-
- struct foo
- {
- int i;
- } the_struct;
-
- main()
- {
- fun(&the_struct);
- return 0;
- }
-
- Lint(1) says:
-
- fun, arg. 1 used inconsistently foo.c(5) :: foo.c(16)
-
- I disagree. The first argument to fun is a pointer to struct foo on both
- lines. In my book, that's the same.
-
- What do you all think?
-
- In case the answers for Standard C and Classic C are different, I'm
- interested in the answer for Classic C.
-
- --
- Hans Mulder hansm@cs.kun.nl
-