From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 20:12:50 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 0623716A4CE for ; Sun, 20 Feb 2005 20:12:50 +0000 (GMT) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4CE143D2D for ; Sun, 20 Feb 2005 20:12:49 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7])0.04 <0IC8002RU85CDVM0@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Sun, 20 Feb 2005 14:12:49 -0600 (CST) Received: by ringworm.mechee.com (Postfix, from userid 1001) id DB2F22CE740; Sun, 20 Feb 2005 12:08:19 -0800 (PST) Date: Sun, 20 Feb 2005 12:08:17 -0800 From: "Michael C. Shultz" In-reply-to: <4218E9A4.8060302@kaqelectronics.dyndns.org> To: freebsd-hackers@freebsd.org Message-id: <200502201208.18130.reso3w83@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Content-disposition: inline References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> <4218E9A4.8060302@kaqelectronics.dyndns.org> User-Agent: KMail/1.7.2 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: Sun, 20 Feb 2005 20:12:50 -0000 On Sunday 20 February 2005 11:48 am, Kathy Quinlan wrote: > Gary Corcoran wrote: > > Kathy Quinlan wrote: > >> Peter Jeremy wrote: > >>> On Mon, 2005-Feb-21 00:22:56 +0800, Kathy Quinlan wrote: > >>>> These are some of the errors I get in pairs for each of the > >>>> above variables: > >>>> > >>>> Wtrend_Drivers.c:15: conflicting types for `Receiver' > >>>> Wtrend_Drivers.h:9: previous declaration of `Receiver' > >>> > >>> Without knowing exactly what is on those lines, it's difficult to > >>> offer any concrete suggestions. > >>> > >>> Two possible ways forward: > >>> 1) Change the declaration at Wtrend_Drivers.h:9 to be 'extern' > >>> 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. > >>> > >>> Peter > >> > >> Here is a section of my code: > >> > >> *** Wtrend_Drivers.c *** > >> > >> (12)void Reset_Network (unsigned char Network) > >> (13) { > >> (14) Length = 0x00; > >> (15) Receiver = 0x00; > >> (16) Node = 0xFF; > >> (17) Command = Reset; > >> (18) Make_Packet_Send(Head , Length, Network, Receiver, Node, > >> Command, p_Data); > >> (19) } > >> > >> *** Wtrend_Drivers.h *** > >> > >> unsigned char Length , Network , Receiver , Node , Command = 0x00; > >> > >> The above is line 9 of the Wtrend_Drivers.h > >> The numbers in () I have added to show the line numbers in > >> Wtrend_Drivers.c > >> > >> These are some of the errors I get in pairs for each of the above > >> variables: > >> > >> Wtrend_Drivers.c:15: conflicting types for `Receiver' > >> Wtrend_Drivers.h:9: previous declaration of `Receiver' > > > > I would try putting the variables in the header file on separate > > lines. For example: > > > > unsigned char Length = 0; > > unsigned char Network = 0; > > unsigned char Receiver = 0; > > etc. > > Done that to no avail :( > > Regards, > > Kat. I wonder if Receiver is defined in a include file elsewhere? I checked all the header files on my system and it isn't, perhaps it is on your though? Maybe easier to rename it? Here is what I did to hunt for it: find /usr/include | xargs grep Receiver > log find /usr/local/include | xargs grep Receiver >> log find /usr/X11R6/include | xargs grep Receiver >> log -Mike