X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fat91sam3.c;h=8005fe0a076496fed4994f5dbfdac0081d806c6d;hb=45e5d1d90acaff8cf57f694e70ec41ece9bddfcd;hp=221832ce600823c522e1548549145609d744a85d;hpb=2986320cde399b0b0ee006a4fecbdec83bebc248;p=openocd.git diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 221832ce60..8005fe0a07 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -1702,7 +1702,7 @@ sam3_get_reg_ptr(struct sam3_cfg *pCfg, const struct sam3_reg_list *pList) // By using prototypes - we can detect what would // be casting errors. - return ((uint32_t *)(((char *)(pCfg)) + pList->struct_offset)); + return ((uint32_t *)(void *)(((char *)(pCfg)) + pList->struct_offset)); } @@ -1756,7 +1756,7 @@ sam3_GetReg(struct sam3_chip *pChip, uint32_t *goes_here) // calculate where this one go.. // it is "possibly" this register. - pPossible = ((uint32_t *)(((char *)(&(pChip->cfg))) + pReg->struct_offset)); + pPossible = ((uint32_t *)(void *)(((char *)(&(pChip->cfg))) + pReg->struct_offset)); // well? Is it this register if (pPossible == goes_here) {