Fix some more -Wextra warnings.

This commit is contained in:
Brian Taylor 2025-05-13 19:01:09 -07:00
parent 0e43c25923
commit a1ee30c645
4 changed files with 8 additions and 5 deletions

View File

@ -5251,12 +5251,11 @@ int get_number_terminals(char *c)
break;
}
case 'p': /* Recognition of up to 100 cpl nodes */
for (i = j = 0; (i < 100) && (*c != '\0'); ++i) {
for (i = j = 0; (i < 100) && (*c != '\0'); i = i + 2) {
inst = gettok_instance(&c);
if (strchr(inst, '='))
j++;
tfree(inst);
i++;
}
if (i == 100)
return 0;

View File

@ -550,6 +550,7 @@ static int get_sysmem(struct sys_mem *memall)
#else
# ifdef notdef
#include <signal.h>
#include <setjmp.h>
@ -625,6 +626,7 @@ baseaddr(void)
#endif
}
#endif
#endif

View File

@ -238,10 +238,12 @@ void cm_d_tristate(ARGS)
if (idp[1].when <= TIME) {
if (str == out->strength) {
s_ctl = Idle;
idp[1].prev = str;
// quietly rude
idp[1].prev = (Digital_State_t)str;
} else {
s_ctl = Normal;
idp[1].prev = out->strength;
// quietly rude
idp[1].prev = (Digital_State_t)out->strength;
idp[1].when = TIME + OUTPUT_DELAY(out);
}
} else {

View File

@ -108,7 +108,7 @@ static char *get_string(char **s, int is_array, Mif_Token_Type_t *token_type)
end = *s;
ret_str = copy_substring(beg, end);
}
*token_type = MIF_STRING;
*token_type = MIF_STRING_TOK;
return ret_str;
}