Skip to content

Commit ffc6dab

Browse files
committed
Fix uninitialized variable warning
1 parent d6dfee9 commit ffc6dab

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

core/module_test.cc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,15 @@ DEF_MODULE(AcmeModule, "acme_module", "foo bar");
3737

3838
class AcmeModuleWithTask : public Module {
3939
public:
40-
AcmeModuleWithTask() : Module() {
41-
is_task_ = true;
42-
}
40+
AcmeModuleWithTask() : Module() { is_task_ = true; }
4341

4442
static const gate_idx_t kNumIGates = 1;
4543
static const gate_idx_t kNumOGates = 2;
4644

47-
CommandResponse Init(const bess::pb::EmptyArg &) {
48-
return CommandResponse();
49-
}
45+
CommandResponse Init(const bess::pb::EmptyArg &) { return CommandResponse(); }
5046

5147
struct task_result RunTask(void *) override {
52-
struct task_result ret;
53-
return ret;
48+
return task_result();
5449
}
5550
};
5651

@@ -305,4 +300,4 @@ TEST_F(ModuleTester, GenerateTCGraph) {
305300
EXPECT_EQ(0, t3->parent_tasks().size());
306301
EXPECT_EQ(0, t4->parent_tasks().size());
307302
}
308-
} // namespace (unnamed)
303+
} // namespace

0 commit comments

Comments
 (0)