[Parser-devel] [token.c] realloc() producing warning while compilation
Status: Beta
Brought to you by:
jineshkj
From: Jinesh K J <jin...@gm...> - 2006-09-27 08:18:55
|
> Ok, I guess I was confused because I was looking at the test cases with > the shell, (using echo "foo") to get rid of the backslashes. I've > updated the repository so all the test cases now work. > Yes! Now everthing is fine. I'll now start working on test cases for puttoken(). > I think the next thing to do is handle invalid input: eg unclosed > quotes, right now that causes a segfault. I'm not sure what the > appropriate way of signalling an error would be. Ohh! That's a very serious issue. Good that you reminded me. Don't worry. If the quote doesn't close, let the '\0' at the end of string be taken for granted. > > Noam BTW, I've added -Wall to cc and some warnings have been removed. One is still left, which is in token.c. See below: [jinesh@jinesh np]$ make cc -Wall -g -D DETAILED=0 token.c main.c token.c: In function 'gettoken': token.c:78: warning: ignoring return value of 'realloc', declared with attribute warn_unused_result I hope that the realloc return value could be used. What so you say? Jinesh. |