On 23/12/16 6:26 PM, Yegappan Lakshmanan wrote:
Hi Tony,

On Sat, Dec 16, 2023 at 3:50 PM Tony Mechelynck <antoine.mechely...@gmail.com> wrote:

    vim9cmds.c: In function ‘compile_defer’:
    vim9cmds.c:2051:18: warning: ‘type’ may be used uninitialized
    [-Wmaybe-uninitialized]
     2051 |         else if (check_func_args_from_type(cctx, type,
    argcount, TRUE,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     2052 |                     arg_start) == FAIL)
          |                     ~~~~~~~~~~
    vim9cmds.c:2003:18: note: ‘type’ was declared here
     2003 |     type_T      *type;
          |                  ^~~~


Which environment and compiler are you using? I don't see this warning.  "type" is initialized at line 2027 and used at line 2051.  We can initialize "type" to NULL at line 2003.
But I don't think this is necessary.

I see this as well. Using gcc. The problem is that the initialization is inside

   if (cctx->ctx_skip != SKIP_YES)

It's true that the use is also inside that condition, so there's no /real/ problem (assuming ctx_skip isn't changed by the intervening function calls.

-ernie


Regards,
Yegappan

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7%3DkERn01BC_ZAkZxh9A9EYoXUDza-BgeSic160nsoDnug%40mail.gmail.com <https://groups.google.com/d/msgid/vim_dev/CAAW7x7%3DkERn01BC_ZAkZxh9A9EYoXUDza-BgeSic160nsoDnug%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/0c49e6d1-b3a4-494b-b95a-1f5d577a64b7%40raelity.com.

Raspunde prin e-mail lui