Terminal::Dispatcher::dispatch: Initialize map

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 <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2011-02-12 16:36:55 -05:00
committed by Keith Winstein
parent 4760da93b3
commit e872ddad59
+1 -1
View File
@@ -152,7 +152,7 @@ void Dispatcher::dispatch( Function_Type type, Parser::Action *act, Framebuffer
collect( &act2 ); collect( &act2 );
} }
dispatch_map_t *map; dispatch_map_t *map = NULL;
switch ( type ) { switch ( type ) {
case ESCAPE: map = &global_dispatch_registry.escape; break; case ESCAPE: map = &global_dispatch_registry.escape; break;
case CSI: map = &global_dispatch_registry.CSI; break; case CSI: map = &global_dispatch_registry.CSI; break;