Since I use level 3 (-O3) optimization in keil5,it is irrelevant with the with the value of the sentence
" !IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN) ",
the judgement "if (!IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN))" is always true,
so I always get "return LOS_NOK"
But if I use level 0 (-O0) , every thing is fun, why?
if (!IS_POOL_ALIGNED(pPool, OS_MEM_POOL_BASE_ALIGN)) return LOS_NOK;
JackShan said:every thing is fun
What do you mean by that?
What is the actual problem?
Reads as FINE
Basically complaint that optimization setting folds code, suggesting some other latent issue with the code.
Need to review the functions and macro expansions more critically to understand why the compiler comes to this conclusion. Insufficient code presented for us to see. Try harder, dig deeper..