On 05:38 Sun 21 Aug , John Marriott wrote: > On 21-Aug-2016 02:37, Bram Moolenaar wrote: > > Patch 7.4.2231 > > Problem: ":oldfiles" output is a very long list. > > Solution: Add a pattern argument. (Coot, closes #575) > > Files: runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c, > > src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro, > > src/testdir/test_viminfo.vim > > > > > After this patch I get the following warning (on mingw64) if > FEAT_QUICKFIX is not defined: > gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 > -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 > -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer > -freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o > ex_cmds.c: In function 'ex_oldfiles': > ex_cmds.c:8415:10: warning: implicit declaration of function > 'skip_vimgrep_pat' [-Wimplicit-function-declaration] > if (skip_vimgrep_pat(eap->arg, ®_pat, NULL) == NULL) > ^~~~~~~~~~~~~~~~ > ex_cmds.c:8415:53: warning: comparison between pointer and integer > if (skip_vimgrep_pat(eap->arg, ®_pat, NULL) == NULL) > ^~ > > Followed by this linker error: > gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF > -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D > FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer > -freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe > gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o > gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o > gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o > gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o > gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o > gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o > gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o > gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o > gobjnative/list.o gobjnative/main.o gobjnative/mark.o > gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o > gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o > gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o > gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o > gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o > gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o > gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o > gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o > gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o > gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o > gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o > gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 > -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid > gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to > `skip_vimgrep_pat' > collect2.exe: error: ld returned 1 exit status > Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed > make: *** [gvim.exe] Error 1 > > skip_vimgrep_pat() is defined in quickfix.c, but the contents are only > included if FEAT_QUICKFIX or PROTO is defined. > > Cheers > John
The attached patch fixes that. Cheers, Marcin -- -- 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.
diff --git a/src/quickfix.c b/src/quickfix.c
index 2fa6ed9..d3def61 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4317,6 +4317,7 @@ theend:
vim_free(target_dir);
vim_regfree(regmatch.regprog);
}
+#endif
/*
* Skip over the pattern argument of ":vimgrep /pat/[g][j]".
@@ -4370,6 +4371,7 @@ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
return p;
}
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
/*
* Restore current working directory to "dirname_start" if they differ, taking
* into account whether it is set locally or globally.
signature.asc
Description: Digital signature
