Fix control reaches end of non-void function

This change makes it so that there is a return value when a kind doens't match. Allows -Werror=return-type to pass.

```
Core/debugger.c: In function ‘read_lvalue’:
Core/debugger.c:239:1: error: control reaches end of non-void function [-Werror=return-type]
 }
```
This commit is contained in:
Rob Loach 2018-10-11 22:17:16 -04:00 committed by GitHub
parent 9080a23913
commit f4ee044347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,15 +226,15 @@ static value_t read_lvalue(GB_gameboy_t *gb, lvalue_t lvalue)
return VALUE_16(GB_read_memory(gb, lvalue.memory_address.value) |
(GB_read_memory(gb, lvalue.memory_address.value + 1) * 0x100));
case LVALUE_REG16:
return VALUE_16(*lvalue.register_address);
case LVALUE_REG_L:
return VALUE_16(*lvalue.register_address & 0x00FF);
case LVALUE_REG_H:
return VALUE_16(*lvalue.register_address >> 8);
case LVALUE_REG16:
default:
return VALUE_16(*lvalue.register_address);
}
}