Date: Sun, 27 Apr 2008 12:41:27 +0200 From: Dominic Fandrey <kamikaze@bsdforen.de> To: freebsd-questions@freebsd.org Subject: lint complains about system includes Message-ID: <48145857.9090304@bsdforen.de>
next in thread | raw e-mail | index | archive | help
I thought it's a good idea to pass my C code through lint. After a number of small changes I was able to remove all problems in my own code, apart from the pass2 errors. So my first problem is that the complaints about the system includes are annoying. Will I have to fix all those files, PR a patch and hope it gets committed to get rid of them or is there an easier way to silence lint about errors that are really not in my hand? What about that llib-lc.ln complaint? I can only find llib-lposix.ln and llib-lstdc.ln. Then there are the pass2 problems. I tried to put prototypes with the extern keyword into my code, but that didn't solve the problems. Anyway here's some example output of lint: # lint server.c server.c: stdlib.h(274): warning: ANSI C does not support 'long long' [265] stdlib.h(275): warning: ANSI C does not support 'long long' [265] stdlib.h(275): warning: ANSI C does not support 'long long' [265] _types.h(60): warning: struct __timer never defined [233] _types.h(61): warning: struct __mq never defined [233] stdio.h(76): warning: struct __sFILEX never defined [233] signal.h(100): warning: struct __ucontext never defined [233] _pthreadtypes.h(44): warning: struct pthread never defined [233] _pthreadtypes.h(45): warning: struct pthread_attr never defined [233] _pthreadtypes.h(46): warning: struct pthread_cond never defined [233] _pthreadtypes.h(47): warning: struct pthread_cond_attr never defined [233] _pthreadtypes.h(48): warning: struct pthread_mutex never defined [233] _pthreadtypes.h(49): warning: struct pthread_mutex_attr never defined [233] _pthreadtypes.h(51): warning: struct pthread_rwlock never defined [233] _pthreadtypes.h(52): warning: struct pthread_rwlockattr never defined [233] _pthreadtypes.h(53): warning: struct pthread_barrier never defined [233] _pthreadtypes.h(54): warning: struct pthread_barrier_attr never defined [233] _pthreadtypes.h(55): warning: struct pthread_spinlock never defined [233] _pthreadtypes.h(75): warning: struct pthread_barrierattr never defined [233] sem.h(32): warning: struct sem never defined [233] lint: cannot find llib-lc.ln Lint pass2: atol used( server.c(53) ), but not defined semget used( server.c(80) ), but not defined shmctl used( server.c(170) ), but not defined signal used( server.c(91) ), but not defined exit used( server.c(208) ), but not defined semctl used( server.c(149) ), but not defined printf used( server.c(49) ), but not defined strcmp used( server.c(135) ), but not defined __error used( server.c(68) ), but not defined shmat used( server.c(72) ), but not defined shmget used( server.c(65) ), but not defined semop used( server.c(121) ), but not defined shmdt used( server.c(161) ), but not defined
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48145857.9090304>