21-09-2017, 10:16 AM
Code:
== file1.c ==
void fn ( int32_t *ptr )
{
*ptr = 10;
}
== file2.c ==
extern void fn ( int32_t *ptr ); /* extern should be in header file */
void loop ( void )
{
for ( int32_t i = 0; i < 10; i++ )
{
fn( &i );
}
}
Posted by and on behalf of the MISRA C Working Group