From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 20 19:21:26 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 22F7416A4CF for ; Sun, 20 Feb 2005 19:21:26 +0000 (GMT) Received: from smtp813.mail.sc5.yahoo.com (smtp813.mail.sc5.yahoo.com [66.163.170.83]) by mx1.FreeBSD.org (Postfix) with SMTP id A504943D2D for ; Sun, 20 Feb 2005 19:21:25 +0000 (GMT) (envelope-from rsharpe@richardsharpe.com) Received: from unknown (HELO ns.aus.com) (ngsharpe1@sbcglobal.net@67.125.87.116 with plain) by smtp813.mail.sc5.yahoo.com with SMTP; 20 Feb 2005 19:21:25 -0000 Received: from ns.aus.com (durable [127.0.0.1]) by ns.aus.com (8.12.11/8.12.8) with ESMTP id j1KJFUBc004110; Sun, 20 Feb 2005 11:15:32 -0800 Received: from localhost (rsharpe@localhost) by ns.aus.com (8.12.11/8.12.11/Submit) with ESMTP id j1KJFCE1004057; Sun, 20 Feb 2005 11:15:19 -0800 X-Authentication-Warning: ns.aus.com: rsharpe owned process doing -bs Date: Sun, 20 Feb 2005 11:15:12 -0800 (PST) From: Richard Sharpe X-X-Sender: rsharpe@durable To: Kathy Quinlan In-Reply-To: <4218DEC5.1080600@kaqelectronics.dyndns.org> Message-ID: References: <4218B960.1050403@kaqelectronics.dyndns.org> <4218DEC5.1080600@kaqelectronics.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Peter Jeremy 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:21:26 -0000 On Mon, 21 Feb 2005, 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' Ummm, move the definition of all those variables to before their first use and see what that does. Also, check that you do not have an earlier definition that does not include the extern keyword. Regards ----- Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com