The modified lines cause "runtime error: left shift of <X> by <Y>
places cannot be represented in type 'int'", because integer
literal is cast to int by default.
Change-Id: Ie38119b5eb46ee470e0d149959e523b48ac4d66d
Signed-off-by: Mete Balci <metebalci@gmail.com>
Reviewed-on: http://openocd.zylin.com/5005
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
uint32_t result = 0;
for (unsigned i = first; i < first + num; i++) {
if (((buffer[i / 8] >> (i % 8)) & 1) == 1)
- result |= 1 << (i - first);
+ result |= 1U << (i - first);
}
return result;
}
return true;
/* optionally ignore the JTAG version field - bits 28-31 of IDCODE */
- uint32_t mask = tap->ignore_version ? ~(0xf << 28) : ~0;
+ uint32_t mask = tap->ignore_version ? ~(0xfU << 28) : ~0U;
uint32_t idcode = tap->idcode & mask;
/* Loop over the expected identification codes and test for a match */
retval = dpm->instr_read_data_r0(dpm, armv8_opcode(armv8, READ_REG_MPIDR), &mpidr);
if (retval != ERROR_OK)
goto done;
- if (mpidr & 1<<31) {
+ if (mpidr & 1U<<31) {
armv8->multi_processor_system = (mpidr >> 30) & 1;
armv8->cluster_id = (mpidr >> 8) & 0xf;
armv8->cpu_id = mpidr & 0x3;