Compiler warning in userfunc.c

13 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Apr 23, 2020, 11:23:51 AM4/23/20
to vim_dev
Hi,

I am seeing the following compiler warning in userfunc.c:

userfunc.c: In function ‘ex_function’:
userfunc.c:2612:3: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
 2612 |   semsg(_("E1056: expected a type: %s"), ret_type);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ret_type variable is set to NULL just before this line.

- Yegappan

Bram Moolenaar

unread,
Apr 23, 2020, 4:24:30 PM4/23/20
to vim...@googlegroups.com, Yegappan Lakshmanan
I've been testing only with the error number, perhaps I should make it a
habit to test more of the message.

--
hundred-and-one symptoms of being an internet addict:
6. You refuse to go to a vacation spot with no electricity and no phone lines.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages