Re: malloc error on pointer

From: Martin Ambuhl (mambuhl_at_earthlink.net)
Date: 03/30/05


Date: Wed, 30 Mar 2005 01:50:24 GMT

jt wrote:
> Looks good to me, I don't understand whey the error below. Any reasons why
> this would fail to compile.
>
> Running on AIX using the CC compiler.
>
> struct sockaddr *cliaddr;
>
> "tcpserver.c", line 88.10: 1506-068 (W) Operation between types "struct
> sockaddr *" and "int" is not allowed.
> cliaddr=malloc(addrlen); //<---------this is the error

You forgot to
   #include <stdlib.h>
so the (pre-C99) assumption that undeclared functions return ints.



Relevant Pages

  • malloc error on pointer
    ... this would fail to compile. ... Running on AIX using the CC compiler. ... struct sockaddr *cliaddr; ...
    (comp.lang.c)
  • Re: Null MDE / MDB failure
    ... Yes we do know about the auto correct - all machines have this switched ... Then open the database in the older version and compile ... > differences on the machines that do fail. ... We use Access 2k to get to the MDE ...
    (microsoft.public.access.forms)
  • Re: Null MDE / MDB failure
    ... The fact that the failing code refers to a field that is not even in the ... Then open the database in the older version and compile ... differences on the machines that do fail. ... We use Access 2k to get to the MDE ...
    (microsoft.public.access.forms)
  • Re: TRICK: methods in ASPX pages with <%%> code blocks
    ... A code behind file is really a specialized class file. ... In my opinion, having code in tags, is mixing it with HTML. ... but your reasons for not doing just don't make sense to me. ... >> 2) compile time error checking ...
    (microsoft.public.dotnet.framework.aspnet)
  • Two utility programs
    ... To compile this program ... To determine if you have AIX 5.2 type ... echo $CMD; exec $CMD ...
    (comp.unix.aix)