util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dev.c : Warning - dereference of null pointer, clang --analyze
@ 2012-06-19 11:44 Marek Otahal
  2012-06-19 12:46 ` Clang analysis warnings WAS: " Marek Otahal
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Otahal @ 2012-06-19 11:44 UTC (permalink / raw)
  To: util-linux

Hi list, 
I was just building util-linux with clang to see how it's static code analysis works. 
Here's what I got so far, I'm not sure about it's correctness, so excuse me if it's stupid. 

 CC       dev.lo
clang: warning: unknown warning option '-Wmissing-parameter-type'; did you mean '-Wmissing-prototypes'?
clang: warning: unknown warning option '-Wunused-but-set-parameter'; did you mean '-Wunused-parameter'?
clang: warning: unknown warning option '-Wunused-but-set-variable'; did you mean '-Wunused-variable'?
dev.c:91:16: warning: Access to field 'next' results in a dereference of a null pointer
      (loaded from variable 'p')
        list_for_each(p, &dev->bid_tags) {
        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../include/list.h:179:48: note: expanded from macro 'list_for_each'
        for (pos = (head)->next; pos != (head); pos = pos->next)
                                                      ^
1 warning generated.

Best regards, Mark 
-- 

Marek Otahal :o)

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

end of thread, other threads:[~2012-06-19 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 11:44 dev.c : Warning - dereference of null pointer, clang --analyze Marek Otahal
2012-06-19 12:46 ` Clang analysis warnings WAS: " Marek Otahal
2012-06-19 13:04   ` [cont.] " Marek Otahal
2012-06-19 13:49   ` [cont.2] " Marek Otahal

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).