summaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-19 20:51:16 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-19 20:51:16 +0000
commit40580e2d71ac56131a5da7e5f67a0b63450e4f24 (patch)
treee35583cefe3a40bfdc0cd2456565f273369b4a3f /src/svf
parent7989000e0969c1ccf69acbc3ce649a020bc1ee66 (diff)
downloadopenocd_libswd-40580e2d71ac56131a5da7e5f67a0b63450e4f24.tar.gz
openocd_libswd-40580e2d71ac56131a5da7e5f67a0b63450e4f24.tar.bz2
openocd_libswd-40580e2d71ac56131a5da7e5f67a0b63450e4f24.tar.xz
openocd_libswd-40580e2d71ac56131a5da7e5f67a0b63450e4f24.zip
Zach Welch <zw@superlucidity.net> fix -Werror warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1472 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/svf')
-rw-r--r--src/svf/svf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index f1a52da0..01e5631c 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -103,7 +103,7 @@ const char *svf_trst_mode_name[4] =
"ABSENT"
};
-char *svf_tap_state_name[16];
+char *svf_tap_state_name[TAP_NUM_STATES];
#define XXR_TDI (1 << 0)
#define XXR_TDO (1 << 1)
@@ -316,7 +316,7 @@ static int handle_svf_command(struct command_context_s *cmd_ctx, char *cmd, char
svf_buffer_size = 2 * SVF_MAX_BUFFER_SIZE_TO_COMMIT;
memcpy(&svf_para, &svf_para_init, sizeof(svf_para));
- for (i = 0; i < dimof(svf_tap_state_name); i++)
+ for (i = 0; i < (int)dimof(svf_tap_state_name); i++)
{
svf_tap_state_name[i] = (char *)tap_state_name(i);
}
@@ -515,7 +515,7 @@ static int svf_tap_state_is_stable(tap_state_t state)
static int svf_tap_state_is_valid(tap_state_t state)
{
- return ((state >= 0) && (state < sizeof(svf_tap_state_name)));
+ return state >= 0 && state < TAP_NUM_STATES;
}
static int svf_find_string_in_array(char *str, char **strs, int num_of_element)