From: Sebastian Harl Date: Fri, 3 Apr 2009 16:34:08 +0000 (+0200) Subject: Fixed some uninitialized variable warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ac66fdb0a7d9af37eeecc59c0fd284f6b065d7fe;p=tig.git Fixed some uninitialized variable warnings GCC 4.3.3, when used with -Wall, emits warnings that those variables "may be used uninitialized in this function". Signed-off-by: Sebastian Harl Signed-off-by: Jonas Fonseca --- diff --git a/tig.c b/tig.c index cffa86d..e52185e 100644 --- a/tig.c +++ b/tig.c @@ -1614,7 +1614,7 @@ static int option_bind_command(int argc, const char *argv[]) { enum request request; - int keymap; + int keymap = -1; int key; if (argc < 3) { @@ -5485,7 +5485,7 @@ status_update_files(struct view *view, struct line *line) struct line *pos = view->line + view->lines; int files = 0; int file, done; - int cursor_y, cursor_x; + int cursor_y = -1, cursor_x = -1; if (!status_update_prepare(&io, line->type)) return FALSE;