Newsgroups: comp.lang.c Path: utzoo!utgpu!radio!brian From: brian@radio.uucp (Brian Glendenning) Subject: Re: Extension of first:he "help" Message-ID: <1988Sep23.102526.10470@radio.uucp> Reply-To: brian@radio.astro.toronto.edu (Brian Glendenning) Organization: Radio Astronomy, University of Toronto References: <9600002@silver> Date: Fri, 23-Sep-88 10:25:26 EDT In article <9600002@silver>, mitchemt@silver writes: > >line 13: warning: illegal combination of pointer and integer, operation = >line 19: redeclaration of newstrel >line 22: warning: illegal combination of pointer and integer, op RETURN > >Any help getting rid of these errors would be welcome. It looks like you haven't declared a function, thus it defaults to integer when you really want it to be returning a pointer. For example: *** Shell output *** radio<10>cat test.c main(){ char *c_ptr; c_ptr = myfunc(); } char *myfunc() { return (char *)0; } radio<11>cc test.c "test.c", line 4: warning: illegal combination of pointer and integer, op = "test.c", line 8: redeclaration of myfunc "test.c", line 9: warning: illegal combination of pointer and integer, op RETURN radio<12>cat test2.c main() { char *c_ptr; char *myfunc(); c_ptr = myfunc(); } char *myfunc() { return (char *)0; } radio<13>cc test2.c radio<14> *** End output *** -- Brian Glendenning - Radio astronomy, University of Toronto brian@radio.astro.toronto.edu uunet!utai!radio!brian glendenn@utorphys.bitnet