Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: gcc compile warning and error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc compile warning and error



On 2 Mar 2010, at 19:28, Dennis Christopher wrote:

> I've moved some c code I am maintaining from a 10.4 device to a 10.5 device and now get a compile warning and error running a build script that uses gcc. The gcc version is 4.01 in both cases.
>
> I get:
>
> rfilter.c: At top level:
> rfilter.c:170: warning: ‘process_diblogin_func’ used but never defined
> rfilter.c:1077: warning: ‘compute_rate’ defined but not used
>
> At line 170 it is declared
> static void
> process_diblogin_func(void *arg);
>
> Then implemented later in the file (rfilter.c.)

^^^^^
This is not true.  The error message on line 170 is the one you get when you declare and call a static function but you don't define it.

You need to find the reason why your definition of process_diblogin_func has been skipped by the compiler.  My guess would be that a block of code has been #ifdef'd out.  That block probably also contains all references to compute_rate except its definition.


>
> Dennis Christopher
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >gcc compile warning and error (From: Dennis Christopher <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.