Jim_AddHashEntry(&interp->sharedStrings, strCopy, (void*)1);
return strCopy;
} else {
- long refCount = (long) he->val;
+ intptr_t refCount = (intptr_t) he->val;
refCount++;
he->val = (void*) refCount;
void Jim_ReleaseSharedString(Jim_Interp *interp, const char *str)
{
- long refCount;
+ intptr_t refCount;
Jim_HashEntry *he = Jim_FindHashEntry(&interp->sharedStrings, str);
if (he == NULL)
Jim_Panic(interp,"Jim_ReleaseSharedString called with "
"unknown shared string '%s'", str);
- refCount = (long) he->val;
+ refCount = (intptr_t) he->val;
refCount--;
if (refCount == 0) {
Jim_DeleteHashEntry(&interp->sharedStrings, str);
return true;
/* Loop over the expected identification codes and test for a match */
- uint8_t ii;
- for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ unsigned ii, limit = tap->expected_ids_cnt;
+
+ for (ii = 0; ii < limit; ii++)
{
if (tap->idcode == tap->expected_ids[ii])
return true;
/* If none of the expected ids matched, warn */
jtag_examine_chain_display(LOG_LVL_WARNING, "UNEXPECTED",
tap->dotted_name, tap->idcode);
- for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ for (ii = 0; ii < limit; ii++)
{
char msg[32];
- snprintf(msg, sizeof(msg), "expected %hhu of %hhu",
- ii + 1, tap->expected_ids_cnt);
+
+ snprintf(msg, sizeof(msg), "expected %u of %u", ii + 1, limit);
jtag_examine_chain_display(LOG_LVL_ERROR, msg,
tap->dotted_name, tap->expected_ids[ii]);
}
// return ERROR_FAIL;
// Save regs
- for (size_t i = 0; i < 16; i++)
+ for (unsigned i = 0; i < 16; i++)
{
context[i] = buf_get_u32((uint8_t*)(&arm11->reg_values[i]),0,32);
- LOG_DEBUG("Save %zi: 0x%" PRIx32 "",i,context[i]);
+ LOG_DEBUG("Save %u: 0x%" PRIx32 "", i, context[i]);
}
cpsr = buf_get_u32((uint8_t*)(arm11->reg_values + ARM11_RC_CPSR),0,32);
{
int common_magic;
reg_cache_t *core_cache;
- enum armv4_5_mode core_mode;
+ int /* armv4_5_mode */ core_mode;
enum armv4_5_state core_state;
bool is_armv4;
int (*full_context)(struct target_s *target);