From owner-freebsd-questions@FreeBSD.ORG Sun Apr 27 10:42:01 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26CA0106564A for ; Sun, 27 Apr 2008 10:42:01 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id D59DE8FC14 for ; Sun, 27 Apr 2008 10:42:00 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mobileKamikaze.norad (unknown [92.117.184.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 2FCA98A083A for ; Sun, 27 Apr 2008 12:41:55 +0200 (CEST) Message-ID: <48145857.9090304@bsdforen.de> Date: Sun, 27 Apr 2008 12:41:27 +0200 From: Dominic Fandrey User-Agent: Thunderbird 2.0.0.12 (X11/20080422) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: lint complains about system includes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 10:42:01 -0000 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