From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:49:01 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 1032216A4CE for ; Sun, 20 Feb 2005 19:49:01 +0000 (GMT) Received: from house.arach.net.au (house1.arach.net.au [203.30.44.84]) by mx1.FreeBSD.org (Postfix) with SMTP id E5FD343D1D for ; Sun, 20 Feb 2005 19:48:59 +0000 (GMT) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: (qmail 26212 invoked from network); 20 Feb 2005 19:48:58 -0000 Received: from unknown (HELO pythagorus.kaqelectronics.dyndns.org) (202.89.173.156) by house1.arach.net.au with SMTP for ; 20 Feb 2005 19:48:58 -0000 Received: from [192.168.0.2] (kathy.kaqelectronics.dyndns.org. [192.168.0.2]) id j1KJosdM017538; Mon, 21 Feb 2005 03:50:54 +0800 (WST) (envelope-from kat-free@kaqelectronics.dyndns.org) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [266.1.0]); Mon, 21 Feb 2005 03:48:52 +0800 Message-ID: <4218E9A4.8060302@kaqelectronics.dyndns.org> Date: Mon, 21 Feb 2005 03:48:52 +0800 From: Kathy Quinlan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-au, en, en-us To: Gary Corcoran References: <4218B960.1050403@kaqelectronics.dyndns.org> <20050220183219.GK57256@cirb503493.alcatel.com.au> <4218DEC5.1080600@kaqelectronics.dyndns.org> <4218E5C8.1050900@comcast.net> In-Reply-To: <4218E5C8.1050900@comcast.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed 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: Sun, 20 Feb 2005 19:49:01 -0000 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. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005