This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit d29ae9bda6597eef9be5e10ade25cc5888fa96a8
Author: wangjianyu3 <[email protected]>
AuthorDate: Thu Jun 25 16:00:10 2026 +0800

    netutils/rexec: initialize ret to avoid maybe-uninitialized
    
    When the relay loop exits early without entering any branch, ret would be
    returned uninitialized, tripping -Werror=maybe-uninitialized. Initialize
    it to 0.
    
    Assisted-by: GitHubCopilot:claude-4.8-opus
    Signed-off-by: wangjianyu3 <[email protected]>
---
 netutils/rexec/rexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/rexec/rexec.c b/netutils/rexec/rexec.c
index 01c8000bf..519790c4a 100644
--- a/netutils/rexec/rexec.c
+++ b/netutils/rexec/rexec.c
@@ -87,7 +87,7 @@ static int do_rexec(FAR struct rexec_arg_s *arg)
   char buffer[REXEC_BUFSIZE];
   struct pollfd fds[2];
   int sock;
-  int ret;
+  int ret = 0;
 
   sock = rexec_af(&arg->host, htons(arg->port), arg->user,
                   arg->password, arg->command,

Reply via email to