1
0
mirror of https://github.com/brouhaha/dis6502.git synced 2024-06-08 04:29:49 +00:00

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) switch(ip->nb)
{ {
case 1: case 1:
operand = 0; /* only to avoid "may be used unitialized" warning */
break; break;
case 2: case 2:
operand = getbyte(addr); operand = getbyte(addr);

View File

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