Hi All,
clang x64 15.0.4 on Win8.1 x64 gives these 3 warnings:
<snip>
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN
-DFEAT_CLIPBOARD os_win32.c -o gobjx86-64/os_win32.o
os_win32.c:4397:10: warning: variable 'repeatCount' set but not used
[-Wunused-but-set-variable]
int repeatCount;
^
1 warning generated.
</snip>
<snip>
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN
-DFEAT_CLIPBOARD gui.c -o gobjx86-64/gui.o
gui.c:67:16: warning: variable 'recursive' set but not used
[-Wunused-but-set-variable]
static int recursive = 0;
^
1 warning generated.
</snip>
<snip>
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -O3 -fomit-frame-pointer -fpie -fPIE -DFEAT_GUI_MSWIN
-DFEAT_CLIPBOARD gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c:6193:7: warning: variable 'clen' set but not used
[-Wunused-but-set-variable]
int clen; // string length in characters
^
1 warning generated.
</snip>
The attached patches try to fix them.
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/baf9d888-7a0e-92c9-b7e6-e478c661b801%40internode.on.net.
--- gui_w32.c.orig 2022-11-03 05:27:40.534333000 +1100
+++ gui_w32.c 2022-11-06 10:01:56.012821800 +1100
@@ -6190,13 +6190,11 @@
// handled here.
int i;
int wlen; // string length in words
- int clen; // string length in characters
int cells; // cell width of string up to composing char
int cw; // width of current cell
int c;
wlen = 0;
- clen = 0;
cells = 0;
for (i = 0; i < len; )
{
@@ -6236,7 +6234,6 @@
}
cells += cw;
i += utf_ptr2len_len(text + i, len - i);
- ++clen;
}
#if defined(FEAT_DIRECTX)
if (IS_ENABLE_DIRECTX())
--- gui.c.orig 2022-10-05 05:54:09.097265500 +1100
+++ gui.c 2022-11-06 10:00:44.761904700 +1100
@@ -64,7 +64,9 @@
gui_start(char_u *arg UNUSED)
{
char_u *old_term;
+#ifdef GUI_MAY_FORK
static int recursive = 0;
+#endif
#if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
char *msg = NULL;
#endif
@@ -76,9 +78,10 @@
cursor_on(); // needed for ":gui" in .vimrc
full_screen = FALSE;
+#ifdef GUI_MAY_FORK
+
++recursive;
-#ifdef GUI_MAY_FORK
/*
* Quit the current process and continue in the child.
* Makes "gvim file" disconnect from the shell it was started in.
@@ -153,7 +156,9 @@
gui_mch_update();
apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
NULL, NULL, FALSE, curbuf);
+#ifdef GUI_MAY_FORK
--recursive;
+#endif
}
/*
--- os_win32.c.orig 2022-11-03 05:27:40.568343700 +1100
+++ os_win32.c 2022-11-06 09:56:19.550102700 +1100
@@ -4394,7 +4394,6 @@
int ret;
DWORD len;
DWORD toRead;
- int repeatCount;
// we query the pipe to see if there is any data to read
// to avoid to perform a blocking read
@@ -4405,11 +4404,9 @@
&availableBytes, // available bytes total
NULL); // byteLeft
- repeatCount = 0;
// We got real data in the pipe, read it
while (ret != 0 && availableBytes > 0)
{
- repeatCount++;
toRead = (DWORD)(BUFLEN - *buffer_off);
toRead = availableBytes < toRead ? availableBytes : toRead;
ReadFile(g_hChildStd_OUT_Rd, buffer + *buffer_off, toRead , &len, NULL);