Pular para o conteúdo principal
Knowledgebase
Home
Renesas Brasil - Knowledgebase

W0520167 Message for Embedded Function__set1_CC-RL

Last Updated:02/07/2018

Question:

I am using RL78 compiler CC-RL and get the “W0520167: Argument of type ‘volatile unsigned char __near *’ is incompatible with parameter of type ‘unsigned char __near *__near’” message when using embedded function __set1. How do I resolve this?

[Example]
volatile unsigned char data;
void func(void)
{
    __set1(&data, 1);
}
 

Answer:

The message appears because the type of the argument of embedded function __set1 is not compatible with the parameter of type “unsigned char __near *__near”.
Cast the type of the argument to unsigned char __near *.

[Example]
volatile unsigned char data;
void func(void)
{
    __set1((unsigned char __near *)&data, 1);    /* Modified */
}

Suitable Products

e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family
  • Este artigo foi útil?