build: enable -Wshadow

Note about shada.c:
- shada_read_next_item_start was intentionally shadowing `unpacked` and
  `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly
  depended on those variable names.
- Macros were changed to parameterize `unpacked` (but not `i`). Macros
  like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other
  approach is messy.
This commit is contained in:
Justin M. Keyes
2016-03-09 09:52:07 -05:00
parent 5fba815921
commit a70fde1b45
18 changed files with 178 additions and 166 deletions

View File

@@ -4006,23 +4006,23 @@ win_line (
draw_color_col = advance_color_col(VCOL_HLC, &color_cols);
}
int attr = base_attr;
int col_attr = base_attr;
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol) {
attr = cuc_attr;
col_attr = cuc_attr;
} else if (draw_color_col && VCOL_HLC == *color_cols) {
attr = mc_attr;
col_attr = mc_attr;
}
if (do_virttext) {
attr = hl_combine_attr(attr, virt_attr);
col_attr = hl_combine_attr(col_attr, virt_attr);
}
attr = hl_combine_attr(attr, line_attr);
col_attr = hl_combine_attr(col_attr, line_attr);
linebuf_attr[off] = attr;
linebuf_attr[off] = col_attr;
if (cells == 2) {
linebuf_attr[off+1] = attr;
linebuf_attr[off+1] = col_attr;
}
off += cells * col_stride;
@@ -5200,9 +5200,9 @@ win_redr_custom (
curattr = attr;
p = buf;
for (n = 0; hltab[n].start != NULL; n++) {
int len = (int)(hltab[n].start - p);
grid_puts_len(&default_grid, p, len, row, col, curattr);
col += vim_strnsize(p, len);
int textlen = (int)(hltab[n].start - p);
grid_puts_len(&default_grid, p, textlen, row, col, curattr);
col += vim_strnsize(p, textlen);
p = hltab[n].start;
if (hltab[n].userhl == 0)