clang 15.0.4 warnings

5 views
Skip to first unread message

John Marriott

unread,
Nov 5, 2022, 7:11:07 PM11/5/22
to vim...@googlegroups.com
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
gui_w32.c.9.0.0836.patch
gui.c.9.0.0836.patch
os_win32.c.9.0.0836.patch

Bram Moolenaar

unread,
Nov 6, 2022, 6:29:03 AM11/6/22
to vim...@googlegroups.com, John Marriott
Thanks. I'll include the patches and also remove the unused
repeatCount.

--
How To Keep A Healthy Level Of Insanity:
1. At lunch time, sit in your parked car with sunglasses on and point
a hair dryer at passing cars. See if they slow down.

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