On Tue, Apr 6, 2010 at 9:41 PM, Ted Unangst wrote:
>> s = (char *) malloc(st.st_size);
>
> If you didn't have bogus casts in your code, the compiler could tell
> you what's wrong with it.
You're right, and in fact, I put the cast there to hide that
particular compiler warning
without realizing t
On Tue, Apr 6, 2010 at 7:22 PM, Philip Guenther wrote:
>
> $ gcc -Wall blah.c
> blah.c: In function `main':
> blah.c:16: warning: implicit declaration of function `exit'
> blah.c:19: warning: implicit declaration of function `malloc'
> blah.c:28: warning: implicit declaration of function `free'
Y
On Tue, Apr 6, 2010 at 9:05 PM, Ludwig Mises wrote:
> The following code exits cleanly (exit status 0) on i386, but on macppc
exits 4:
> s = (char *) malloc(st.st_size);
If you didn't have bogus casts in your code, the compiler could tell
you what's wrong with it.
On Tue, Apr 6, 2010 at 6:05 PM, Ludwig Mises wrote:
> The following code exits cleanly (exit status 0) on i386, but on macppc exits
> 4:
...
> $ gcc -o blah blah.c
...
> Is there something wrong with the .c program?
Yes.
$ gcc -Wall blah.c
blah.c: In function `main':
blah.c:16: warning: implici
4 matches
Mail list logo