terminal: fix warning about uninitialized variable

In fact the struct member `value` was not initialized for Invalid_entry.
This commit is contained in:
Christian Helmuth 2014-09-08 11:55:16 +02:00 committed by Norman Feske
parent 0b5f901e58
commit 289cfa5fcf
3 changed files with 5 additions and 6 deletions

View File

@ -8,6 +8,7 @@ install_config {
<service name="ROM"/> <service name="ROM"/>
<service name="RAM"/> <service name="RAM"/>
<service name="LOG"/> <service name="LOG"/>
<service name="RM"/>
</parent-provides> </parent-provides>
<default-route> <default-route>
<any-service> <any-child/> <parent/> </any-service> <any-service> <any-child/> <parent/> </any-service>

View File

@ -9,6 +9,7 @@ build {
init init
drivers/framebuffer drivers/framebuffer
drivers/input drivers/input
drivers/timer
drivers/pci drivers/pci
server/nitpicker server/nitpicker
server/nit_fb server/nit_fb

View File

@ -71,8 +71,8 @@ namespace Terminal {
{ {
enum { INVALID, NUMBER, CODE }; enum { INVALID, NUMBER, CODE };
int type; int type = INVALID;
int value; int value = 0;
}; };
struct Number_entry : Entry struct Number_entry : Entry
@ -85,10 +85,7 @@ namespace Terminal {
Code_entry(int code) { type = CODE, value = code; } Code_entry(int code) { type = CODE, value = code; }
}; };
struct Invalid_entry : Entry struct Invalid_entry : Entry { };
{
Invalid_entry() { type = INVALID; }
};
private: private: