[coreboot] C Programming
Star Liu
minxinjianxin at gmail.com
Mon Jul 14 00:16:06 CEST 2008
I hope I'm not posting to the wrong place, if so, please remind me :)
I'm making some practice on C programming, so that I can get into the
linux world. Here is a simple code
129 char comment[1025];
130 cgiFormString("comment", comment, 1025);
131 if(strcasestr(comment, "</xmp")!=NULL)
{
fprintf(cgiOut, "</xmp is not allowed");
return;
}
when i compile, there is a warning:
gcc -o LeaveMessage LeaveMessage.c cgic.c
LeaveMessage.c: In function 'LeaveMessage':
LeaveMessage.c:131: warning: comparison between pointer and integer
but i found in http://www.gnu.org/software/libc/manual/html_node/Search-Functions.html#Search-Functions
— Function: char * strcasestr (const char *haystack, const char *needle)
So i don't know why i got this warning, what's the correct way to deal with it?
thanks!
--
Regards!
Star
Shanghai, China
More information about the coreboot
mailing list