[splint-discuss] warning -compmempass

Vishal Bayskar vishal.bayskar at nechclst.in
Tue Apr 1 08:12:45 PST 2008


Dear All,

Please help me in understanding the below warning


file.c:1111:28: Storage servers[] reachable from global is fresh
                        (should be unqualified)
  Storage derivable from a parameter does not match the alias kind
expected for
  the formal parameter. (Use -compmempass to inhibit warning)

What does this error meant?


In code 

Memory is being allocated to the array servers[] in loop


for ( i = 0 ;i <10;i++)
{

	servers[i] = (char *) calloc (1,MAX_SERVERS);

	if servers[i]==NULL

	{
		Return 1;		//this is a line number 1111
		
	}


 }  

here servers[] is a global variable and declare as         

static char *servers[MAX_SERVERS];






Thanks and Regards
 
Vishal Bayskar
 
Ext. no. 927


Disclaimer:

This message and any attachment(s) contained here are information that is confidential, proprietary to NEC HCL System Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.




More information about the splint-discuss mailing list