From e872ddad597a8f2adc111b139acad360c91b4ae8 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 12 Feb 2011 16:36:55 -0500 Subject: [PATCH] Terminal::Dispatcher::dispatch: Initialize map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes this warning (which becomes an error with -Werror): terminaldispatcher.cpp: In member function ‘void Terminal::Dispatcher::dispatch(Terminal::Function_Type, Parser::Action*, Terminal::Framebuffer*)’: terminaldispatcher.cpp:156:19: error: ‘map’ may be used uninitialized in this function Signed-off-by: Anders Kaseorg --- terminaldispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminaldispatcher.cpp b/terminaldispatcher.cpp index bef0a63..6fadf4d 100644 --- a/terminaldispatcher.cpp +++ b/terminaldispatcher.cpp @@ -152,7 +152,7 @@ void Dispatcher::dispatch( Function_Type type, Parser::Action *act, Framebuffer collect( &act2 ); } - dispatch_map_t *map; + dispatch_map_t *map = NULL; switch ( type ) { case ESCAPE: map = &global_dispatch_registry.escape; break; case CSI: map = &global_dispatch_registry.CSI; break;