I have the following definitions in my code:
typedef struct {
volatile uint8_t* RB_Port;
uint8_t RB_Mask;
} NFlash_Accesss_Def_t;
#pragma INLINE
static bool_t MT29f_Busy( const NFlash_Accesss_Def_t* pPort ){
return ( *pPort->RB_Port & pPort->RB_Mask ) == 0;
}
Using these definitions why does the following give me the warning "C5909: Assignment in condition"?
while( MT29f_Busy( pChip_Ctrl) ) {
}
It works fine, I just get the warning... If I don't make it inline, I don't get the warning.
Thanks!
Same problem here. Using CodeWarrior 10.6 for HCS08.
Any advice?
I believe the compiler is doint an internal assignment for the inlined code (return value).
To get rid of that warning, you could disable that warning for that file or function?
Would that work for you?
Erich
Hi Erich,
thanks for the reply. Indeed, that's what it looks like. I would rather avoid disabling the warning for the sake of code safety. The real solution would be to release a patch or to include a fix in the next release of CodeWarrior. Is there a bug tracking/reporting platform available for CodeWarrior?
Cheers
Which version of the toolchain/S08 compiler are you using?
I tried your example with the S08 compiler in CodeWarrior for MCU10.3, and I do not get that warning?
I'm using CodeWarrior Development Studio for the S12(X), V5.1 Release. Version 5.9.0.