Skip to content

Commit

Permalink
terminal: fix warning about uninitialized variable
Browse files Browse the repository at this point in the history
In fact the struct member `value` was not initialized for Invalid_entry.
  • Loading branch information
chelmuth authored and nfeske committed Sep 11, 2014
1 parent 0b5f901 commit 289cfa5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions repos/gems/run/terminal_decoder.run
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ install_config {
<service name="ROM"/>
<service name="RAM"/>
<service name="LOG"/>
<service name="RM"/>
</parent-provides>
<default-route>
<any-service> <any-child/> <parent/> </any-service>
Expand Down
1 change: 1 addition & 0 deletions repos/gems/run/terminal_log.run
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build {
init
drivers/framebuffer
drivers/input
drivers/timer
drivers/pci
server/nitpicker
server/nit_fb
Expand Down
9 changes: 3 additions & 6 deletions repos/os/include/terminal/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ namespace Terminal {
{
enum { INVALID, NUMBER, CODE };

int type;
int value;
int type = INVALID;
int value = 0;
};

struct Number_entry : Entry
Expand All @@ -85,10 +85,7 @@ namespace Terminal {
Code_entry(int code) { type = CODE, value = code; }
};

struct Invalid_entry : Entry
{
Invalid_entry() { type = INVALID; }
};
struct Invalid_entry : Entry { };

private:

Expand Down

0 comments on commit 289cfa5

Please sign in to comment.