pussuw commented on code in PR #16361:
URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097578555


##########
fs/vfs/fs_ioctl.c:
##########
@@ -39,6 +40,15 @@
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: fd_vioctl
+ ****************************************************************************/
+
+static int fd_vioctl(int fd, int req, va_list ap)

Review Comment:
   ~~The problem with sim is that it inlines this static function which messes 
up the variadic argument list; instead of making a copy of ap for this function 
call, this function consumes the first argument...
   
   One way to fix this would be to change nx_ioctl to nx_vioctl, is that 
acceptable ?~~
   
   What I said is garbage. No matter what I do the variadic list is modified by 
the function (even though a copy is passed). A va_end/va_start is needed. You 
learn something new everyday..



##########
fs/vfs/fs_ioctl.c:
##########
@@ -39,6 +40,15 @@
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: fd_vioctl
+ ****************************************************************************/
+
+static int fd_vioctl(int fd, int req, va_list ap)

Review Comment:
   ~~The problem with sim is that it inlines this static function which messes 
up the variadic argument list; instead of making a copy of ap for this function 
call, this function consumes the first argument...~~
   
   ~~One way to fix this would be to change nx_ioctl to nx_vioctl, is that 
acceptable ?~~
   
   What I said is garbage. No matter what I do the variadic list is modified by 
the function (even though a copy is passed). A va_end/va_start is needed. You 
learn something new everyday..



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