On 11-Jan-2019 23:43, Bram Moolenaar wrote:
Patch 8.1.0717
Problem: There is no function for the ":sign jump" command.
Solution: Add the sign_jump() function. (Yegappan Lakshmanan, closes #3780)
Files: runtime/doc/eval.txt, runtime/doc/sign.txt,
runtime/doc/usr_41.txt, src/evalfunc.c, src/proto/sign.pro,
src/sign.c, src/testdir/test_signs.vim
After this patch, mingw-64 (gcc 8.2.1) throws this warning if FEAT_SIGNS
is not defined:
gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -DFEAT_MBYTE -pipe -march=native -Wall -O3
-fomit-frame-pointer -freg-struct-return -s evalfunc.c -o
gobjnative/evalfunc.o
evalfunc.c:1927:1: warning: 'get_buf_arg' defined but not used
[-Wunused-function]
get_buf_arg(typval_T *arg)
^~~~~~~~~~~
Surrounding the function with #if FEAT_SIGNS should fix it. However, the
attached patch (generated after patch 8.1.0724) moves the function
get_buf_arg() down to after the #if FEAT_SIGNS at line 11301, which also
does the trick.
Cheers
John
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
--- evalfunc.c.orig 2019-01-12 05:18:31.680492500 +1100
+++ evalfunc.c 2019-01-12 05:33:34.516174200 +1100
@@ -1920,23 +1920,6 @@
}
/*
- * Get the buffer from "arg" and give an error and return NULL if it is not
- * valid.
- */
- static buf_T *
-get_buf_arg(typval_T *arg)
-{
- buf_T *buf;
-
- ++emsg_off;
- buf = tv_get_buf(arg, FALSE);
- --emsg_off;
- if (buf == NULL)
- EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
- return buf;
-}
-
-/*
* "bufname(expr)" function
*/
static void
@@ -11299,6 +11282,24 @@
}
#ifdef FEAT_SIGNS
+
+/*
+ * Get the buffer from "arg" and give an error and return NULL if it is not
+ * valid.
+ */
+ static buf_T *
+get_buf_arg(typval_T *arg)
+{
+ buf_T *buf;
+
+ ++emsg_off;
+ buf = tv_get_buf(arg, FALSE);
+ --emsg_off;
+ if (buf == NULL)
+ EMSG2(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
+ return buf;
+}
+
/*
* "sign_define()" function
*/