Why I am getting orange warnings if I try to de-reference a 16 bit pointer variable?

2 ビュー (過去 30 日間)
Binod Sharma
Binod Sharma 2017 年 8 月 31 日
回答済み: Alexandre De Barros 2017 年 9 月 1 日
I am trying to access microcontroller registers by using 16 bit pointer variable, but it throws orange polyspace warnings. But when I try to access a 32 bit registers by same mechanism, it is perfectly fine.
a = ((tUI16)REG_1); // REG_1 is pointer to 16 bit register ---> Red error b = ((tUI32)REG_2); // REG_2 is pointer to 32 bit register ---> No error
I need to take care of these, since they are causing red warnings(NTL) in the loop they are implemented in. How shall I proceed?

回答 (1 件)

Alexandre De Barros
Alexandre De Barros 2017 年 9 月 1 日
Hello Binod,
are REG_1 and REG_2 really pointers? Because here you are casting these pointers to integers. Can you tell me the definition of REG_1 and REG_2?
--- Alex

カテゴリ

Help Center および File ExchangeTroubleshooting in Polyspace Products for Ada についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by