John Marriott wrote:
> On 21-Dec-2022 07:02, Bram Moolenaar wrote:
> > Patch 9.0.1084
> > Problem: Code handling low level MS-Windows events cannot be tested.
> > Solution: Add test_mswin_event() and tests using it. (Christopher
> > Plewright,
> > closes #11622)
> > Files: runtime/doc/builtin.txt, runtime/doc/testing.txt,
> > runtime/doc/usr_41.txt, src/evalfunc.c, src/gui_w32.c,
> > src/os_win32.c, src/proto/gui_w32.pro, src/proto/os_win32.pro,
> > src/proto/testing.pro, src/term.c, src/testing.c,
> > src/testdir/Make_all.mak, src/testdir/mouse.vim,
> > src/testdir/test_gui.vim, src/testdir/test_mswin_event.vim,
> > src/testdir/test_termcodes.vim
> >
> >
> After this patch, msys64 (clang 15.0.5) reports these 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 os_win32.c -o
> objx86-64/os_win32.o
> os_win32.c:1760:9: warning: variable 'mods' is used uninitialized
> whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (move)
> ^~~~
> os_win32.c:1826:9: note: uninitialized use occurs here
> if (mods != 0)
> ^~~~
> os_win32.c:1760:5: note: remove the 'if' if its condition is always false
> if (move)
> ^~~~~~~~~
> os_win32.c:1738:15: note: initialize the variable 'mods' to silence this
> warning
> int_u mods;
> ^
> = 0
> os_win32.c:1883:1: warning: unused function 'peek_input_record_buffer'
> [-Wunused-function]
> peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength)
> ^
> 2 warnings generated.
> </snip>
>
> The attached patch tries to fix both warnings.
>
> It seems that the function peek_input_record_buffer() is not used
> anywhere. So the patch removes it.
Thanks, I'll include the patch.
--
DENNIS: Listen -- strange women lying in ponds distributing swords is no
basis for a system of government. Supreme executive power derives
from a mandate from the masses, not from some farcical aquatic
ceremony.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20221220204819.146111C06DC%40moolenaar.net.