diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2018-04-08 19:23:50 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2018-04-08 19:23:50 +0000 |
commit | 92223bddedf0f8b964a62904f065b12563db8ae9 (patch) | |
tree | 4db447c9116342fb3c3ff8816aece790831680f0 /sys/teken/teken_subr_compat.h | |
parent | ac2605b1d19e8c4ef72d240d4b56f45c6c50d557 (diff) | |
download | src-92223bddedf0f8b964a62904f065b12563db8ae9.tar.gz src-92223bddedf0f8b964a62904f065b12563db8ae9.zip |
Pedantic polishing of code to please FlexeLint.
Approved by: ed
Notes
Notes:
svn path=/head/; revision=332297
Diffstat (limited to 'sys/teken/teken_subr_compat.h')
-rw-r--r-- | sys/teken/teken_subr_compat.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h index 23df0a8111da..4cf4f5e98c7b 100644 --- a/sys/teken/teken_subr_compat.h +++ b/sys/teken/teken_subr_compat.h @@ -29,15 +29,15 @@ */ static void -teken_subr_cons25_set_border(teken_t *t, unsigned int c) +teken_subr_cons25_set_border(const teken_t *t, unsigned int c) { teken_funcs_param(t, TP_SETBORDER, c); } static void -teken_subr_cons25_set_global_cursor_shape(teken_t *t, unsigned int ncmds, - unsigned int cmds[]) +teken_subr_cons25_set_global_cursor_shape(const teken_t *t, unsigned int ncmds, + const unsigned int cmds[]) { unsigned int code, i; @@ -58,7 +58,7 @@ teken_subr_cons25_set_global_cursor_shape(teken_t *t, unsigned int ncmds, } static void -teken_subr_cons25_set_local_cursor_type(teken_t *t, unsigned int type) +teken_subr_cons25_set_local_cursor_type(const teken_t *t, unsigned int type) { teken_funcs_param(t, TP_SETLOCALCURSOR, type); @@ -86,7 +86,7 @@ teken_subr_cons25_set_default_foreground(teken_t *t, unsigned int c) static const teken_color_t cons25_revcolors[8] = { 0, 4, 2, 6, 1, 5, 3, 7 }; void -teken_get_defattr_cons25(teken_t *t, int *fg, int *bg) +teken_get_defattr_cons25(const teken_t *t, int *fg, int *bg) { *fg = cons25_revcolors[teken_256to8(t->t_defattr.ta_fgcolor)]; @@ -96,14 +96,14 @@ teken_get_defattr_cons25(teken_t *t, int *fg, int *bg) } static void -teken_subr_cons25_switch_virtual_terminal(teken_t *t, unsigned int vt) +teken_subr_cons25_switch_virtual_terminal(const teken_t *t, unsigned int vt) { teken_funcs_param(t, TP_SWITCHVT, vt); } static void -teken_subr_cons25_set_bell_pitch_duration(teken_t *t, unsigned int pitch, +teken_subr_cons25_set_bell_pitch_duration(const teken_t *t, unsigned int pitch, unsigned int duration) { @@ -113,9 +113,10 @@ teken_subr_cons25_set_bell_pitch_duration(teken_t *t, unsigned int pitch, static void teken_subr_cons25_set_graphic_rendition(teken_t *t, unsigned int cmd, - unsigned int param __unused) + unsigned int param) { + (void)param; switch (cmd) { case 0: /* Reset. */ t->t_curattr = t->t_defattr; @@ -136,6 +137,8 @@ teken_subr_cons25_set_terminal_mode(teken_t *t, unsigned int mode) case 1: /* Switch terminal to cons25. */ t->t_stateflags |= TS_CONS25; break; + default: + break; } } |