jerpelea opened a new pull request, #21200:
URL: https://github.com/apache/nuttx/pull/21200

   ## Summary
   
   tone_register() takes a struct oneshot_lowerhalf_s *, and the header does 
not include the one that defines it.  Including tone.h first therefore creates 
the tag in prototype scope, and passing a real oneshot to it fails with the 
memorable diagnostic "expected 'struct oneshot_lowerhalf_s *' but argument is 
of type 'struct oneshot_lowerhalf_s *'".
   
   Every existing user happens to include nuttx/timers/oneshot.h first, which 
is why this has not bitten before.
   
   Tested with a small file that includes nuttx/audio/tone.h first and calls 
tone_register().  Before the change, GCC 13.2 gives the warning above and GCC 
15.3 stops with an error.  After the change, both compile it without a 
diagnostic.  stm32f103-minimum:audio_tone builds.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to