3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Keep gcc from complaining about uninitialized variables

This commit is contained in:
Larry Doolittle 2015-08-14 13:22:17 -07:00 committed by Clifford Wolf
parent 0350074819
commit 022f570563
2 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ void handle_memory(RTLIL::Module *module, RTLIL::Cell *memory)
Const initval = memory->parameters.at("\\INIT");
RTLIL::Cell *last_init_cell = nullptr;
SigSpec last_init_data;
int last_init_addr;
int last_init_addr=0;
for (int i = 0; i < GetSize(initval) && i/mem->width < (1 << abits); i += mem->width) {
Const val = initval.extract(i, mem->width, State::Sx);