xiaoxiang781216 commented on pull request #5779:
URL: https://github.com/apache/incubator-nuttx/pull/5779#issuecomment-1072455871


   > > > @xiaoxiang781216 so the changes with `const` didn't work?
   > > 
   > > 
   > > Yes, the compiler report: can't modify const argv.
   > 
   > Maybe I put `const` in a wrong place. I think it should be `FAR const char 
**argv = NULL;` and not `FAR char * const *argv = NULL;`
   
   If so, we require cast in two place: execv and lib_free.
   
   > as I initially suggested. We need a pointer to a pointer that points a 
constant data and `FAR char * const *argv = NULL;` means that `argv[0] =` is 
illegal. My mistake
   
   I has tried all possible combination(const char **, char * const *, const 
char * const), char ** is the best option since it require the less cast.
   


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to