On 17-Jan-2023 05:19, Bram Moolenaar wrote:
Patch 9.0.1208
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11819)
Files: src/netbeans.c, src/normal.c, src/ops.c, src/option.c,
src/optionstr.c, src/os_amiga.c, src/os_mac_conv.c,
src/os_mswin.c, src/os_qnx.c, src/os_unix.c, src/os_win32.c
After this patch, msys64 (clang 15.0.5) gives this error:
<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_mswin.c -o gobjx86-64/os_mswin.o
os_mswin.c:1574:5: error: expected expression
DWORD err = CommDlgExtendedError();
^
os_mswin.c:1576:9: error: use of undeclared identifier 'err'; did you
mean 'erf'?
if (err)
^~~
erf
D:/msys64/ucrt64/include/math.h:900:25: note: 'erf' declared here
extern double __cdecl erf (double);
^
os_mswin.c:1585:9: error: use of undeclared identifier 'err'; did you
mean 'erf'?
NULL, err, 0, (LPTSTR)(&buf), 0, NULL);
^~~
erf
D:/msys64/ucrt64/include/math.h:900:25: note: 'erf' declared here
extern double __cdecl erf (double);
^
3 errors generated.
make: *** [Make_cyg_ming.mak:1206: gobjx86-64/os_mswin.o] Error 1
</snip>
The attach patch tries to fix it.
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/358d3e7d-2486-6478-e38e-1a4dd6a7aedf%40internode.on.net.
--- os_mswin.c.orig 2023-01-17 05:56:58.987408500 +1100
+++ os_mswin.c 2023-01-17 06:04:55.972839800 +1100
@@ -1390,6 +1390,8 @@
DEVNAMES *devname;
int i;
+ DWORD err;
+
bUserAbort = &(psettings->user_abort);
CLEAR_FIELD(prt_dlg);
prt_dlg.lStructSize = sizeof(PRINTDLGW);
@@ -1571,7 +1573,7 @@
return TRUE;
init_fail_dlg:
- DWORD err = CommDlgExtendedError();
+ err = CommDlgExtendedError();
if (err)
{