Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2001 11:15:45 -0400 (EDT)
From:      Walter Campbell <wcampbel@botbay.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/29675: lint fails on stdio.h
Message-ID:  <200108131515.f7DFFj466717@botbay.net>

next in thread | raw e-mail | index | archive | help

>Number:         29675
>Category:       bin
>Synopsis:       lint fails on stdio.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 13 08:20:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Walter Campbell
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
botbay.net
>Environment:
System: FreeBSD botbay.net 4.3-STABLE FreeBSD 4.3-STABLE #0: Fri Jul 27 11:53:35 EDT 2001 root@botbay.net:/usr/obj/usr/src/sys/KABEL i386

Also checked with current cvsup (as of 11h03 EDT)

>Description:

lint(1) will fail on C files that include stdio.h

>How-To-Repeat:

wcampbel@botbay (alis-2.2beta2.patched): lint -aacgprxhH *.c
alis.c:
stdio.h:299: syntax error
alis.c:56: warning: argument id unused in function channel_hash_func
alis.c:126: warning: pointer casts may be troublesome
alis.c:133: warning: pointer casts may be troublesome
alis.c:144: warning: pointer casts may be troublesome
alis.c:162: warning: pointer casts may be troublesome
alis.c:176: warning: pointer casts may be troublesome
alis.c:202: warning: pointer casts may be troublesome
alis.c:251: warning: declaration hides earlier one: tmp
alis.c:753: warning: statement not reached
alis.c:711: warning: argument argc unused in function main
alis.c:711: warning: argument argv unused in function main

This happens with make lint on ircd-hybrid 6.2rc1

netdb.h:127: warning: struct sockaddr never defined
dbuf.c:
stdio.h:299: syntax error

make lint will then error out with return code 1.

Sample code that can cause lint to error out:

#include <stdio.h>

int main(int argc, char *arvg[])
{
	printf("Test\n");
	return 0;
}

Giving the messages:
wcampbel@botbay (wcampbel): lint -aacgprxhH lint-test.c
lint-test.c:
stdio.h:299: syntax error
lint-test.c:3: warning: argument argc unused in function main
lint-test.c:3: warning: argument arvg unused in function main
wcampbel@botbay (wcampbel): echo $?
1

>Fix:

I am not sure how to fix this.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108131515.f7DFFj466717>