warning: inline function ‘vcos_timer_delete’ declared but ne

5 posts
by chris_c » Wed Jul 04, 2012 6:55 pm
warning: inline function ‘vcos_timer_delete’ declared but never defined [enabled by default]

I get a whole bunch of warning like this at compile time which seem to be satisfied when linked???

this happens on any file that includes GLES2/gl2.h

I'd rather be able to stop the warning happening but if pushed would be happy to know which gcc switch will supress that specific warning - it causes that much spew you have to scroll to see your own warnings/error

any clues most welcome!
Posts: 147
Joined: Sun May 06, 2012 10:23 am
by chris_c » Thu Jul 12, 2012 11:38 am
no one?

I've seen other projects with this warning so it's not just me! :D

Can anyone at least tell me a gcc switch that hides this warning?
Posts: 147
Joined: Sun May 06, 2012 10:23 am
by terryspitz » Fri Dec 28, 2012 10:31 am
just seen this when adding -std=c99 to CFLAGS in my Makefile.

addin -fgnu89-inline fixes it, see http://gcc.gnu.org/onlinedocs/gcc/C-Dia ... tions.html
Posts: 4
Joined: Fri Dec 28, 2012 9:23 am
by chris_c » Fri Dec 28, 2012 10:56 pm
nice find! thanks
Posts: 147
Joined: Sun May 06, 2012 10:23 am
by IanH2 » Sat Jan 05, 2013 8:31 am
The warning comes from making a function declaration e.g.

Code: Select all
inline void foo();

but never actually defining it (i.e. giving it a body with statements in). If your program is linking OK, it means this function is not in fact needed anywhere.

My guess is that vcos_timer_delete() has a definition somewhere, but there's some #if nonsense around it which stops it being seen. This may be a bug in the header file, or you may need to #define something to enable the definition.
Posts: 79
Joined: Tue Dec 18, 2012 10:17 am