vim-patch:8.0.1688: some macros are used without a semicolon

Problem:    Some macros are used without a semicolon, causing auto-indent to be
            wrong.
Solution:   Use the do-while(0) trick. (Ozaki Kiichi, closes vim/vim#2729)
6f4700233f
This commit is contained in:
Jan Edmund Lazo
2019-06-25 22:38:13 -04:00
parent 62c7fcbdab
commit 2d6c91ab99
4 changed files with 81 additions and 58 deletions

View File

@@ -1,9 +1,9 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* for debugging */
/* #define CHECK(c, s) if (c) EMSG(s) */
#define CHECK(c, s)
// for debugging
// #define CHECK(c, s) do { if (c) EMSG(s); } while (0)
#define CHECK(c, s) do { } while (0)
/*
* memline.c: Contains the functions for appending, deleting and changing the