fix most sign and variable initialization warnings

Change-Id: I56e08db791152a9c95fc0d16bc75b702e403274d
diff --git a/editors/vi.c b/editors/vi.c
index b4ad12e..5245aca 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -280,7 +280,7 @@
 	int last_file_modified;  // = -1;
 	int save_argc;           // how many file names on cmd line
 	int cmdcnt;              // repetition count
-	unsigned rows, columns;	 // the terminal screen is this size
+	int rows, columns;       // the terminal screen is this size
 #if ENABLE_FEATURE_VI_ASK_TERMINAL
 	int get_rowcol_error;
 #endif
@@ -648,7 +648,9 @@
 #if ENABLE_FEATURE_VI_WIN_RESIZE
 static int query_screen_dimensions(void)
 {
-	int err = get_terminal_width_height(STDIN_FILENO, &columns, &rows);
+	unsigned c, r;
+	int err = get_terminal_width_height(STDIN_FILENO, &c, &r);
+	columns = c; rows = r;
 	if (rows > MAX_SCR_ROWS)
 		rows = MAX_SCR_ROWS;
 	if (columns > MAX_SCR_COLS)
@@ -2084,7 +2086,7 @@
 		p           += bias;
 #if ENABLE_FEATURE_VI_YANKMARK
 		{
-			int i;
+			unsigned i;
 			for (i = 0; i < ARRAY_SIZE(mark); i++)
 				if (mark[i])
 					mark[i] += bias;