소스 검색

ucode-mod-uline: fix build warnings

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 8 달 전
부모
커밋
b9685dcf3d
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      package/utils/ucode-mod-uline/src/ucode.c
  2. 1 1
      package/utils/ucode-mod-uline/src/uline.c

+ 1 - 1
package/utils/ucode-mod-uline/src/ucode.c

@@ -141,7 +141,7 @@ uc_uline_get_line(uc_vm_t *vm, size_t nargs)
 {
 	struct uc_uline_state *us = uc_fn_thisval("uline.state");
 	uc_value_t *line2 = uc_fn_arg(0);
-	uc_value_t *state, *val;
+	uc_value_t *state;
 	const char *line;
 	size_t len;
 

+ 1 - 1
package/utils/ucode-mod-uline/src/uline.c

@@ -893,7 +893,7 @@ void uline_set_hint(struct uline_state *s, const char *str, size_t len)
 		pos_add_string(s, &s->cursor_pos, str, len);
 	}
 
-	if (s->cursor_pos.y >= s->rows) {
+	if (s->cursor_pos.y >= (int16_t)s->rows) {
 		if (s->cursor_pos.x > 0)
 			vt100_next_line(s->output);
 		s->cursor_pos = (struct pos){};