[splint-discuss] /*@null@*/ array elements

Kozics Péter pkzc at freemail.hu
Sun Jun 24 13:28:15 PDT 2007


I couldn't figure out myself and could not find any hint in the splint 
manual how to annotate array elements to be /*@null@*/.

I would like to get rid of the warning

redef.c:5:20: Local a[0][0] initialized to null value: a[0][0] = 0
  A reference with no null annotation is assigned or initialized to NULL.

for the following code.


int *f( void )
{
  int *a[2][3] = {{0}};
 
  return a[1][1];
}


When I naively annotate the array with /*@null@*/., it seems that I make 
statement about ``a'' and not about its elements which are of type int 
*, and which the the warning refers to.

thank you
Peter




More information about the splint-discuss mailing list