assign dummy value to operand for single-byte case to avoid warning.

This commit is contained in:
Eric Smith 2003-09-13 00:54:07 +00:00
parent 30b423e3cb
commit 411f589ffa
2 changed files with 3 additions and 0 deletions

1
main.c
View File

@ -82,6 +82,7 @@ void trace_inst (addr_t addr)
switch(ip->nb)
{
case 1:
operand = 0; /* only to avoid "may be used unitialized" warning */
break;
case 2:
operand = getbyte(addr);

View File

@ -161,6 +161,8 @@ int print_inst(addr_t addr)
switch(ip->nb) {
case 1:
operand = 0; /* only to avoid "may be used
unitialized" warning */
break;
case 2:
operand = getbyte(addr);