From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 21 06:58:49 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD68D16A4CE for ; Mon, 21 Feb 2005 06:58:49 +0000 (GMT) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1A9A43D31 for ; Mon, 21 Feb 2005 06:58:48 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1L6wjxB010826 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 21 Feb 2005 17:58:46 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1L6wj7l084534; Mon, 21 Feb 2005 17:58:45 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)j1L6wiUS084533; Mon, 21 Feb 2005 17:58:45 +1100 (EST) (envelope-from pjeremy) Date: Mon, 21 Feb 2005 17:58:44 +1100 From: Peter Jeremy To: Kathy Quinlan Message-ID: <20050221065844.GB81063@cirb503493.alcatel.com.au> References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <4218DEC5.1080600@kaqelectronics.dyndns.org> User-Agent: Mutt/1.4.2i cc: Freebsd-hackers@freebsd.org Subject: Re: Error in my C programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2005 06:58:50 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, 2005-Feb-21 03:02:29 +0800, Kathy Quinlan wrote: >Peter Jeremy wrote: >>2) Pre-process the source and have a close look at the definitions and >> declarations for Receiver. You may have a stray #define that is >> confusing the type or a missing semicolon. ... >(14) Length = 0x00; >(15) Receiver = 0x00; >(16) Node = 0xFF; ... >unsigned char Length , Network , Receiver , Node , Command = 0x00; ... >Wtrend_Drivers.c:15: conflicting types for `Receiver' >Wtrend_Drivers.h:9: previous declaration of `Receiver' I'm unable to reproduce this with any of gcc2.95.4, gcc3.2.3 or gcc3.4.2 using the attached code. The cause of the problem is somewhere outside the code fragments you've posted. I suggest you try: gcc -E -P Wtrend_Drivers.c > foo.c gcc -c foo.c Then look at the lines in foo.c around the reported error(s). If you can't see the problem, chop down foo.c until you have something that is reasonable in size and safe to post and post the entire file. You might also like to indicate what version of FreeBSD you are running and the output from 'gcc -v'. I presume that you've verified that there are no non-ASCII characters in or near the lines in question that might be confusing things. -- Peter Jeremy --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="foo.c" #define Reset 0 #define Head 0 #define p_Data 0 unsigned char Length , Network , Receiver , Node , Command = 0x00; void Make_Packet_Send(int, int, int, int, int, int, int); void Reset_Network (unsigned char Network) { Length = 0x00; Receiver = 0x00; Node = 0xFF; Command = Reset; Make_Packet_Send(Head , Length, Network, Receiver, Node, Command, p_Data); } --gKMricLos+KVdGMg--