[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C Programming warning



On Mon, Jul 14, 2008 at 11:15 AM, Star Liu <minxinjianxin@gmail.com> wrote:
> On Mon, Jul 14, 2008 at 8:52 AM, sanool. LUPA <sanool@gmail.com> wrote:
>> the func strcasestr not return a pointer...
>> so, try to use as follows:
>>
>> if((char*)strcasestr(comment, "</xmp")!=NULL)
>>
>> but its just a warning, forget it...
>
I've tested that, in AMD64, it needs to be like this, for the address
is 64 bits.
	char* n=(char*)((long)(strcasestr(a,b)));
	if(n==NULL)	fprintf(stdout,"not found");
	else fprintf(stdout,n);

-- 
Regards!
Star
Shanghai, China


Reply to: