user37343: I'm trying to communicate between two Arduino Due and Nano. Nano as Master and Due as a slave. As given in the library description Wire Lib
When the master request for data from the slave, first it goes to Request ISR. Wire.onRequest(requestEvent)    But when compile the program for Arduino Due I get following errors.     
In file included from C:\Users\\Slave_Test3.ino:14:0:


C:\Users\..\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\libraries\Wire\src/Wire.h:59:7: error:   initializing argument 1 of 'void TwoWire::onRequest(void (*)())' [-fpermissive]



 void onRequest(void(*)(void));

       ^

But If I change from Arduino Due to any other board this error does not come.
Thank you

user10394: Dead easy !!
(Well only because I had a -fpermissive yesterday :) )
You are trying to implicitly cast, and you can't do that with modern GCC versions (quite rightly).  
So you need to explicitly cast the first parameter to void*.
Because this is in a "core" library for the Due I would get the latest version of the board package and see if it goes away.  You can turn the check off, but you will need to google on how to do that.

37343: <p>I'm trying to communicate between two Arduino Due and Nano. Nano as Master and Due as a slave. As given in the library description <a href="https://www.arduino.cc/en/Tutorial/MasterReader" rel="nofollow noreferrer">Wire Lib</a></p>

<p>When the master request for data from the slave, first it goes to Request ISR. <code>Wire.onRequest(requestEvent)</code>    But when compile the program for Arduino Due I get following errors.     </p>

<pre><code>In file included from C:\Users\\Slave_Test3.ino:14:0:


C:\Users\..\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\libraries\Wire\src/Wire.h:59:7: error:   initializing argument 1 of 'void TwoWire::onRequest(void (*)())' [-fpermissive]



 void onRequest(void(*)(void));

       ^
</code></pre>

<p>But If I change from Arduino Due to any other board this error does not come.</p>

<p>Thank you</p>
 10394: <p>Dead easy !!
(Well only because I had a <code>-fpermissive</code> yesterday :) )</p>

<p>You are trying to implicitly cast, and you can't do that with modern GCC versions (quite rightly).  </p>

<p>So you need to explicitly cast the first parameter to void*.</p>

<p>Because this is in a "core" library for the Due I would get the latest version of the board package and see if it goes away.  You can turn the check off, but you will need to google on how to do that.</p>
