Project: fixed some warnings from other compilers

This commit is contained in:
(Tim) Efthimis Kritikos 2024-02-14 02:45:28 +00:00
parent ed415511dc
commit 79577d7b4e
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ all:test.rom
first: ${OBJECT_FILES}
${QUIET_LINK}
${Q}gcc -ggdb $^ -fsanitize=address -lncurses -ltinfo -o $@
${Q}gcc -ggdb $^ -fsanitize=address -fsanitize=undefined -fsanitize=leak -lncursesw -ltinfow -o $@
%.rom:%.asm first
$(QUIET_FAS)

2
cpu.c
View File

@ -227,10 +227,10 @@ void free_exec_data(struct exec_data_t *tofree){
}
int exec(struct simdata_t *simdata){
free_instr_list(&simdata->cpu_gui_hints->executing_list);
int condition=0;
switch(simdata->exec_data->EXEC_ACTION){
case CALL:
case JUMP:
int condition=0;
switch(simdata->exec_data->COND){
case NONE: condition=1; break;
case ZERO: condition=simdata->registers->FLAGS&1; break;

2
gui.c
View File

@ -484,7 +484,7 @@ int update_general_registers(struct simdata_t *simdata){
for(int i=0;i<per_line;i++){
if(n<8){
float float_equiv=*(float*)(simdata->registers->GPR+n);
if(float_equiv<9999999999&&float_equiv>-9999999999)
if(float_equiv<9999999999.0&&float_equiv>-9999999999.0)
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%08f) ",n,simdata->registers->GPR[n],float_equiv);
else
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%cinf) ",n,simdata->registers->GPR[n],(float_equiv>0)?'+':'-');