Re: gcc function signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



in one of the header file I have this declaration

toto.h
extern int hkl_pseudo_axis_engine_init_func(HklPseudoAxisEngineMode *mode,
				     HklPseudoAxisEngine *self,
				     HklGeometry *geometry,
 				     HklDetector const *detector,
 				     HklSample const *sample)

but in the
toto.c I had

int (HklPseudoAxisEngine *self,
 				     HklGeometry *geometry,
 				     HklDetector const *detector,
 				     HklSample const *sample)
{
}


and gcc did not complain during the compile time about this is it normal.

You should do

#include "toto.h"

in toto.c .  You can use -Wmissing-declarations yo warn about all places
where you forgot to do that (or where you have something needlessly global).


Segher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux