aboutsummaryrefslogtreecommitdiff
path: root/src/svf/svf.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2010-01-26 17:54:49 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-01-26 17:54:49 -0800
commit9e52957efc93734f70295a489481f4f9f3944242 (patch)
tree6762ab2ef5208cebad86346ee13a578bf8e70804 /src/svf/svf.c
parent33fc60befc808b83ab4ef6b1c7a7130c7ccedfc8 (diff)
downloadriscv-openocd-9e52957efc93734f70295a489481f4f9f3944242.zip
riscv-openocd-9e52957efc93734f70295a489481f4f9f3944242.tar.gz
riscv-openocd-9e52957efc93734f70295a489481f4f9f3944242.tar.bz2
cygwin buildfix
isspace() parameter must be an integer, else a 'char' gets used as an array index (sigh). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/svf/svf.c')
-rw-r--r--src/svf/svf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index ea56a88..f46d698 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -585,7 +585,7 @@ static int svf_parse_cmd_string(char *str, int len, char **argus, int *num_of_ar
goto parse_char;
default:
parse_char:
- if (!in_bracket && isspace(str[pos]))
+ if (!in_bracket && isspace((int) str[pos]))
{
space_found = 1;
str[pos] = '\0';
@@ -710,7 +710,7 @@ static int svf_copy_hexstring_to_binary(char *str, uint8_t **bin, int orig_bit_l
/* consume optional leading '0' MSBs or whitespace */
while (str_len > 0 && ((str[str_len - 1] == '0')
- || isspace(str[str_len - 1])))
+ || isspace((int) str[str_len - 1])))
str_len--;
/* check validity: we must have consumed everything */