Browse Source

Add -Wshadow to tool build flags.

And fixes a shadowed (but harmless) loop counter warning.
master
cancel 5 years ago
parent
commit
eaef5482d5
  1. 4
      tool
  2. 4
      tui_main.c

4
tool

@ -209,7 +209,9 @@ build_target() {
local out_exe local out_exe
add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra add cc_flags -std=c99 -pipe -finput-charset=UTF-8 -Wall -Wpedantic -Wextra
if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then
add cc_flags -Wconversion -Wstrict-prototypes -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion add cc_flags -Wconversion -Wshadow -Wstrict-prototypes \
-Werror=implicit-function-declaration -Werror=implicit-int \
-Werror=incompatible-pointer-types -Werror=int-conversion
fi fi
if [[ $lld_detected = 1 ]]; then if [[ $lld_detected = 1 ]]; then
add cc_flags -fuse-ld=lld add cc_flags -fuse-ld=lld

4
tui_main.c

@ -588,8 +588,8 @@ void draw_oevent_list(WINDOW* win, Oevent_list const* oevent_list) {
Oevent_osc_ints const* eo = &ev->osc_ints; Oevent_osc_ints const* eo = &ev->osc_ints;
wprintw(win, "OSC\t%c\tcount: %d ", eo->glyph, eo->count, eo->count); wprintw(win, "OSC\t%c\tcount: %d ", eo->glyph, eo->count, eo->count);
waddch(win, ACS_VLINE); waddch(win, ACS_VLINE);
for (Usz i = 0; i < eo->count; ++i) { for (Usz j = 0; j < eo->count; ++i) {
wprintw(win, " %d", eo->numbers[i]); wprintw(win, " %d", eo->numbers[j]);
} }
} break; } break;
case Oevent_type_udp_string: { case Oevent_type_udp_string: {

Loading…
Cancel
Save