Skip to content

Commit f701993

Browse files
Fix compilation error on new OpenBMC codebase
Fix compilation error on new OpenBMC codebase by correct tab on somes code to fix "this ‘if’ clause does not guard... [-Wmisleading-indentation]" warning. This commit also correct the size of variables to fix "[-Werror=stringop-overflow=]" error. Signed-off-by: Hieu Huynh <[email protected]>
1 parent 48b4d06 commit f701993

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/flash/nor/numicro.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ static uint32_t numicro_fmc_cmd(struct target *target, uint32_t cmd, uint32_t ad
12431243
retval = target_read_u32(target, NUMICRO_FLASH_ISPTRG, &status);
12441244
if (retval != ERROR_OK)
12451245
return retval;
1246-
LOG_DEBUG("status: 0x%" PRIx32 "", status);
1246+
LOG_DEBUG("status: 0x%" PRIx32 "", status);
12471247
if ((status & (ISPTRG_ISPGO)) == 0)
12481248
break;
12491249
if (timeout-- <= 0) {
@@ -1512,7 +1512,7 @@ static int numicro_erase(struct flash_bank *bank, unsigned int first,
15121512
retval = target_read_u32(target, NUMICRO_FLASH_ISPTRG, &status);
15131513
if (retval != ERROR_OK)
15141514
return retval;
1515-
LOG_DEBUG("status: 0x%" PRIx32 "", status);
1515+
LOG_DEBUG("status: 0x%" PRIx32 "", status);
15161516
if (status == 0)
15171517
break;
15181518
if (timeout-- <= 0) {
@@ -1601,7 +1601,7 @@ static int numicro_write(struct flash_bank *bank, const uint8_t *buffer,
16011601
retval = target_read_u32(target, NUMICRO_FLASH_ISPTRG, &status);
16021602
if (retval != ERROR_OK)
16031603
return retval;
1604-
LOG_DEBUG("status: 0x%" PRIx32 "", status);
1604+
LOG_DEBUG("status: 0x%" PRIx32 "", status);
16051605
if (status == 0)
16061606
break;
16071607
if (timeout-- <= 0) {

src/target/arm920t.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ static int arm920t_read_cp15_interpreted(struct target *target,
245245
uint32_t cp15_opcode, uint32_t address, uint32_t *value)
246246
{
247247
struct arm *arm = target_to_arm(target);
248-
uint32_t *regs_p[1];
249-
uint32_t regs[2];
248+
uint32_t *regs_p[16];
249+
uint32_t regs[16];
250250
uint32_t cp15c15 = 0x0;
251251
struct reg *r = arm->core_cache->reg_list;
252252

@@ -295,7 +295,7 @@ int arm920t_write_cp15_interpreted(struct target *target,
295295
{
296296
uint32_t cp15c15 = 0x0;
297297
struct arm *arm = target_to_arm(target);
298-
uint32_t regs[2];
298+
uint32_t regs[16];
299299
struct reg *r = arm->core_cache->reg_list;
300300

301301
/* load value, address into R0, R1 */

0 commit comments

Comments
 (0)