ppisa commented on PR #19912:
URL: https://github.com/apache/nuttx/pull/19912#issuecomment-5859990463

   > @Acfboy did you discover more about it? Maybe @ghaerr and @ppisa have some 
suggestion how to fix it.
   
   I have looked at it and the situation is complex and fuzzy. The official 
Microsoft widows documentation states that correctly build resource section in 
the executable has to align dialog defining sections to 4 byte aligned. In 
another document it states that the function should/has to accept unaligned 
data due to compatibility with non-conformant binaries.
   
   Because we cannot run 32-bit and or 64-bit binaries/EXE files intended for 
MS Widows and only option is to rebuild source code where only GDI part matches 
Widows, the file access, sockets, etc. are expected to be POSIX compliant, then 
I suggest only to suppress  warning in Microwidows source and only for NuttX, 
which is too picky (especially for x86 QEMU target).
   
   So I think that the right solution for Microwidows for now (and may it be 
forever) is to keep code as it is and not risk other problems and degraded 
performance and left there this specific warning to be printed for case that 
somebody gets into problems that he/she knows that there is intentionally 
problematic place. To move forward with NuttX, I suggest only to suppress 
warning for now.
   
   Idea of the solution
   '''
   #ifdef NUTTX
   #pragma GCC diagnostic push
   #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
   #endif
   
   code of function CreateDialogIndirectParam
   
   #ifdef NUTTX
   #pragma GCC diagnostic pop
   #endif
   '''
   
   I have this workaround in my mind for some weeks, but I have been on 
https://isd.esa.int/ last week where I have discussed how to continue with LwIP 
for RTEMS and some motion control projects, we have local 
https://www.linuxdays.cz/ now and then https://www.suse.com/ has sponsored 
booth on https://events.linuxfoundation.org/open-source-summit-europe/ with our 
QtRvSim (we want to run it on OpenSUSE at Milk-V Pioneer 64-cores RISC-V 
system) and presenting cooperation with our university 
https://comparch.edu.cvut.cz/ and then there is 
https://communityovercode.apache.org/events/glasgow-2026/ with NuttX.
   
   So I see space for this after October 15. If I find while earlier, then I 
can look at it.
   
   I have found some more potential warnings for some combinations of 
configuration options in Microwindows so again, if I find time I try to look at 
it.
   
   


-- 
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