how to avoid compilation error: expression must be a modifiable lvalue
Afficher commentaires plus anciens
Hi.
I met a compilation error with following code. a physical buffer (communication buffer of MCU) tossed to void* dest. if I change all argument to local variable and pointer compilation successful.
First I thought, polyspace doesn't understand typecasting of void to other, but I guess now when physical address is tossed as argument then it occur compilation error "expression must be a modifiable lvalue", since polyspace doesn't understand physical address.
Am i thinking correct? and does anybody can help me to avoid compilation error?
typedef unsigned char u08;
void* AL_MemCpy (void* dest, const void* source, u08 count)
{
while (count--)
{
*((u08*)dest)++ = *((u08*)source)++;
}
}
// used in other function like below
(void)AL_MEMCPY(RxBuffer,&(data[1]),(u08)RxMessage.Length);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Troubleshoot Compilation Errors dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!