Thanks both

From: Michiel Konstapel [mailto:[email protected]]
Sent: 06 February 2014 08:52
To: Eric Decker; Doyle, Alan
Cc: [email protected]
Subject: RE: [Tinyos-help] warning: call via function pointer

That would be

CFLAGS +=-Wno-nesc-fnptr

in your Makefile. I've used it to suppress the warning for a state machine that 
uses function pointers.

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Eric Decker
Sent: Wednesday, February 05, 2014 20:00
To: Doyle, Alan
Cc: 
[email protected]<mailto:[email protected]>
Subject: Re: [Tinyos-help] warning: call via function pointer

The implication is just that it is dangerous.   If something hammers the 
pointer the call will go off in the weeds.

Its use is discouraged because of this for embedded systems that need to be 
extremely robust.

But it happens.   And if you know what you are doing and are willing to accept 
the risks then it is fine.

there is a way to turn the warning off but i don't remember how to do it.


On Wed, Feb 5, 2014 at 4:13 AM, Doyle, Alan 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

New to TinyOs. I'm importing existing code that uses function pointers and get 
the 'warning: call via function pointer' compiler message. As its a warning its 
presumably not illegal but what are the implications of using them?

Thanks


_______________________________________________
Tinyos-help mailing list
[email protected]<mailto:[email protected]>
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to