Browse Source

Remove some compiler warnings

pre-master-46
Holger Vogt 5 years ago
parent
commit
e8aea4967c
  1. 10
      src/frontend/inpcom.c
  2. 2
      src/frontend/parser/numparse.c

10
src/frontend/inpcom.c

@ -2096,7 +2096,7 @@ static int is_a_modelname(const char *s)
} }
/* test if we have a true number */ /* test if we have a true number */
if (*st == '\0' || isspace(*st)) {
if (*st == '\0' || isspace_c(*st)) {
return FALSE; return FALSE;
} }
@ -2139,7 +2139,7 @@ static int is_a_modelname(const char *s)
break; break;
} }
/* test if we have a true scale factor */ /* test if we have a true scale factor */
if (*st == '\0' || isspace(*st))
if (*st == '\0' || isspace_c(*st))
return FALSE; return FALSE;
/* test if people use Ohms, F, H for RLC, like pF or uOhms */ /* test if people use Ohms, F, H for RLC, like pF or uOhms */
@ -2152,7 +2152,7 @@ static int is_a_modelname(const char *s)
else if ((*st == 'f') || (*st == 'h')) else if ((*st == 'f') || (*st == 'h'))
st = st + 1; st = st + 1;
if (*st == '\0' || isspace(*st)) {
if (*st == '\0' || isspace_c(*st)) {
return FALSE; return FALSE;
} }
@ -8029,8 +8029,8 @@ static struct card *pspice_compat(struct card *oldcard)
} }
else { // if an integer number, it is node4 else { // if an integer number, it is node4
bool is_node4 = TRUE; bool is_node4 = TRUE;
while (*cut_line && !isspace(*cut_line))
if (!isdigit(*cut_line++))
while (*cut_line && !isspace_c(*cut_line))
if (!isdigit_c(*cut_line++))
is_node4 = FALSE; // already model name is_node4 = FALSE; // already model name
if (is_node4) { if (is_node4) {
cut_line = nexttok(cut_line); // model name cut_line = nexttok(cut_line); // model name

2
src/frontend/parser/numparse.c

@ -192,7 +192,7 @@ static int get_decimal_number(const char **p_str, double *p_val)
/* Ensure string either starts with a digit or a decimal point followed /* Ensure string either starts with a digit or a decimal point followed
* by a digit */ * by a digit */
if ((!isdigit(ch_cur) && ch_cur != '.') || if ((!isdigit(ch_cur) && ch_cur != '.') ||
((ch_cur == '.') && !isdigit(p_cur[1]))) {
((ch_cur == '.') && !isdigit_c(p_cur[1]))) {
return -1; return -1;
} }

Loading…
Cancel
Save