Patch 8.2.0545
Problem: Unused arguments ignored in non-standard way.
Solution: Add UNUSED instead of (void).
Files: src/libvterm/t/harness.c
*** ../vim-8.2.0544/src/libvterm/t/harness.c 2020-04-11 18:01:10.933802350 +0200
--- src/libvterm/t/harness.c 2020-04-11 21:35:53.144830730 +0200
***************
*** 65,74 ****
static VTermEncodingInstance encoding;
! static int parser_text(const char bytes[], size_t len, void *user)
{
size_t i;
- (void)user;
printf("text ");
for(i = 0; i < len; i++) {
--- 65,73 ----
static VTermEncodingInstance encoding;
! static int parser_text(const char bytes[], size_t len, void *user UNUSED)
{
size_t i;
printf("text ");
for(i = 0; i < len; i++) {
***************
*** 82,99 ****
return i;
}
! static int parser_control(unsigned char control, void *user)
{
- (void)user;
printf("control %02x\n", control);
return 1;
}
! static int parser_escape(const char bytes[], size_t len, void *user)
{
size_t i;
- (void)user;
if(bytes[0] >= 0x20 && bytes[0] < 0x30) {
if(len < 2)
--- 81,96 ----
return i;
}
! static int parser_control(unsigned char control, void *user UNUSED)
{
printf("control %02x\n", control);
return 1;
}
! static int parser_escape(const char bytes[], size_t len, void *user UNUSED)
{
size_t i;
if(bytes[0] >= 0x20 && bytes[0] < 0x30) {
if(len < 2)
***************
*** 112,121 ****
return len;
}
! static int parser_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user)
{
int i;
- (void)user;
printf("csi %02x", command);
if(leader && leader[0]) {
--- 109,117 ----
return len;
}
! static int parser_csi(const char *leader, const long args[], int argcount, const char *intermed, char command, void *user UNUSED)
{
int i;
printf("csi %02x", command);
if(leader && leader[0]) {
***************
*** 144,153 ****
return 1;
}
! static int parser_osc(const char *command, size_t cmdlen, void *user)
{
size_t i;
- (void)user;
printf("osc ");
for(i = 0; i < cmdlen; i++)
--- 140,148 ----
return 1;
}
! static int parser_osc(const char *command, size_t cmdlen, void *user UNUSED)
{
size_t i;
printf("osc ");
for(i = 0; i < cmdlen; i++)
***************
*** 157,166 ****
return 1;
}
! static int parser_dcs(const char *command, size_t cmdlen, void *user)
{
size_t i;
- (void)user;
printf("dcs ");
for(i = 0; i < cmdlen; i++)
--- 152,160 ----
return 1;
}
! static int parser_dcs(const char *command, size_t cmdlen, void *user UNUSED)
{
size_t i;
printf("dcs ");
for(i = 0; i < cmdlen; i++)
***************
*** 184,192 ****
static int want_movecursor = 0;
static VTermPos state_pos;
! static int movecursor(VTermPos pos, VTermPos oldpos, int visible, void *user)
{
- (void)oldpos, (void)visible, (void)user;
state_pos = pos;
if(want_movecursor)
--- 178,185 ----
static int want_movecursor = 0;
static VTermPos state_pos;
! static int movecursor(VTermPos pos, VTermPos oldpos UNUSED, int visible UNUSED, void *user UNUSED)
{
state_pos = pos;
if(want_movecursor)
***************
*** 196,204 ****
}
static int want_scrollrect = 0;
! static int scrollrect(VTermRect rect, int downward, int rightward, void *user)
{
- (void)user;
if(!want_scrollrect)
return 0;
--- 189,196 ----
}
static int want_scrollrect = 0;
! static int scrollrect(VTermRect rect, int downward, int rightward, void *user UNUSED)
{
if(!want_scrollrect)
return 0;
***************
*** 210,218 ****
}
static int want_moverect = 0;
! static int moverect(VTermRect dest, VTermRect src, void *user)
{
- (void)user;
if(!want_moverect)
return 0;
--- 202,209 ----
}
static int want_moverect = 0;
! static int moverect(VTermRect dest, VTermRect src, void *user UNUSED)
{
if(!want_moverect)
return 0;
***************
*** 224,232 ****
}
static int want_settermprop = 0;
! static int settermprop(VTermProp prop, VTermValue *val, void *user)
{
- (void)user;
VTermValueType type;
if(!want_settermprop)
return 1;
--- 215,222 ----
}
static int want_settermprop = 0;
! static int settermprop(VTermProp prop, VTermValue *val, void *user UNUSED)
{
VTermValueType type;
if(!want_settermprop)
return 1;
***************
*** 256,265 ****
// These callbacks are for State
static int want_state_putglyph = 0;
! static int state_putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
{
int i;
- (void)user;
if(!want_state_putglyph)
return 1;
--- 246,254 ----
// These callbacks are for State
static int want_state_putglyph = 0;
! static int state_putglyph(VTermGlyphInfo *info, VTermPos pos, void *user UNUSED)
{
int i;
if(!want_state_putglyph)
return 1;
***************
*** 279,287 ****
}
static int want_state_erase = 0;
! static int state_erase(VTermRect rect, int selective, void *user)
{
- (void)user;
if(!want_state_erase)
return 1;
--- 268,275 ----
}
static int want_state_erase = 0;
! static int state_erase(VTermRect rect, int selective, void *user UNUSED)
{
if(!want_state_erase)
return 1;
***************
*** 303,311 ****
VTermColor foreground;
VTermColor background;
} state_pen;
! static int state_setpenattr(VTermAttr attr, VTermValue *val, void *user)
{
- (void)user;
switch(attr) {
case VTERM_ATTR_BOLD:
state_pen.bold = val->boolean;
--- 291,298 ----
VTermColor foreground;
VTermColor background;
} state_pen;
! static int state_setpenattr(VTermAttr attr, VTermValue *val, void *user UNUSED)
{
switch(attr) {
case VTERM_ATTR_BOLD:
state_pen.bold = val->boolean;
***************
*** 342,350 ****
return 1;
}
! static int state_setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
{
- (void)row, (void)newinfo, (void)oldinfo, (void)user;
return 1;
}
--- 329,336 ----
return 1;
}
! static int state_setlineinfo(int row UNUSED, const VTermLineInfo *newinfo UNUSED, const VTermLineInfo *oldinfo UNUSED, void *user UNUSED)
{
return 1;
}
***************
*** 364,372 ****
static int want_screen_damage = 0;
static int want_screen_damage_cells = 0;
! static int screen_damage(VTermRect rect, void *user)
{
- (void)user;
if(!want_screen_damage)
return 1;
--- 350,357 ----
static int want_screen_damage = 0;
static int want_screen_damage_cells = 0;
! static int screen_damage(VTermRect rect, void *user UNUSED)
{
if(!want_screen_damage)
return 1;
***************
*** 417,427 ****
}
static int want_screen_scrollback = 0;
! static int screen_sb_pushline(int cols, const VTermScreenCell *cells, void *user)
{
int eol;
int c;
- (void)user;
if(!want_screen_scrollback)
return 1;
--- 402,411 ----
}
static int want_screen_scrollback = 0;
! static int screen_sb_pushline(int cols, const VTermScreenCell *cells, void *user UNUSED)
{
int eol;
int c;
if(!want_screen_scrollback)
return 1;
***************
*** 438,447 ****
return 1;
}
! static int screen_sb_popline(int cols, VTermScreenCell *cells, void *user)
{
int col;
- (void)user;
if(!want_screen_scrollback)
return 0;
--- 422,430 ----
return 1;
}
! static int screen_sb_popline(int cols, VTermScreenCell *cells, void *user UNUSED)
{
int col;
if(!want_screen_scrollback)
return 0;
***************
*** 471,481 ****
screen_sb_popline // sb_popline
};
! int main(int argc, char **argv)
{
char line[1024] = {0};
int flag;
- (void)argc, (void)argv;
int err;
--- 454,463 ----
screen_sb_popline // sb_popline
};
! int main(int argc UNUSED, char **argv UNUSED)
{
char line[1024] = {0};
int flag;
int err;
*** ../vim-8.2.0544/src/version.c 2020-04-11 21:31:24.045391347 +0200
--- src/version.c 2020-04-11 21:39:40.888779310 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 545,
/**/
--
Every time I lose weight, it finds me again!
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///