johannes-nivus edited a comment on issue #553: Fix a few nxstyle complaints in 
arm hostfs
URL: https://github.com/apache/incubator-nuttx/pull/553#issuecomment-598117026
 
 
   Named struct initializers are a c99 feature if I recall correctly.
   So not allowed according to coding standard:
   "NuttX generally follows C89 and all code outside of architecture specific 
directories must be compatible with C89"
   
   Nevertheless you could argue that arch/arm/src/common is architecture 
specific.
   
   Without trying, is the following compiling correctly?
   
   ```
     struct
     {
       const char *pathname;
       long mode;
       size_t len;
     } open;
     
     open.pathname = pathname;
     open.mode = host_flags_to_mode(flags);
     open.len =  strlen(pathname);
    ```
   
   Edit I wrote bullshit before, but the above is correct.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to