in polyspace why pointers assignation fails

if I have this code : u8MyArray[10]; u8 * pu8FirstPointer; u8 * pu8Data; u8 u8Index; pu8FirstPointer = u8MyArray; while( u8Index <10) { *pu8FirstPointer = *pu8Data; pu8FirstPointer ++ ; pu8Data++; }
this code is supposed to copy the data to the array but polyspace doesn't get it ,why?

回答 (1 件)

Christian Bard
Christian Bard 2014 年 2 月 17 日

0 投票

With the following code, and with default options, Polyspace Code Prover (release R2013b) "got" it:
typedef unsigned char u8;
u8 u8Dest[10];
u8 u8Source[10];
void foo(void)
{
u8 * pu8FirstPointer;
u8 * pu8Data;
u8 u8Index = 0;
pu8FirstPointer = u8Dest;
pu8Data = u8Source;
while( u8Index <10) {
*pu8FirstPointer = *pu8Data;
pu8FirstPointer ++ ;
pu8Data++;
u8Index++;
}
}
So, would you please, contact www.mathworks.com/support with options used, realease and some explanation about what do you mean by "Polyspace doesn't get it".

カテゴリ

ヘルプ センター および File ExchangeGet Started with Polyspace Products for Ada についてさらに検索

質問済み:

2014 年 2 月 16 日

回答済み:

2014 年 2 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by