freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Daniel Corbe" <daniel.junkmail AT gmail.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] cast to void?
- Date: Mon, 3 Dec 2007 19:29:52 -0500
Most likely to squash a warning on some random crappy compiler. Believe it
or not not all compilers follow the standard religiously.
On Dec 3, 2007 7:19 PM, James K. Lowden <jklowden AT freetds.org> wrote:
> Hi Freddy!
>
> memset((void*)pnullrep->bindval, ' ', bindlen);
>
> Why the cast? The first argument to memset is a void*. There's no need to
> cast it. In C, any data pointer can be assigned to a void pointer, and a
> void pointer can be assigned to any data pointer. That's why void* was
> invented!
>
> http://www.lysator.liu.se/c/rat/c2.html
> http://www.opengroup.org/onlinepubs/000095399/functions/memset.html
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
[freetds] cast to void?,
James K. Lowden, 12/03/2007
-
Re: [freetds] cast to void?,
Daniel Corbe, 12/03/2007
-
Re: [freetds] cast to void?,
Christos Zoulas, 12/03/2007
-
Re: [freetds] cast to void?,
James K. Lowden, 12/03/2007
-
Re: [freetds] cast to void?,
ZIGLIO, Frediano, VF-IT, 12/04/2007
- Re: [freetds] cast to void?, James K. Lowden, 12/04/2007
- Re: [freetds] cast to void?, Christos Zoulas, 12/04/2007
-
Re: [freetds] cast to void?,
ZIGLIO, Frediano, VF-IT, 12/04/2007
-
Re: [freetds] cast to void?,
James K. Lowden, 12/03/2007
-
Re: [freetds] cast to void?,
Christos Zoulas, 12/03/2007
-
Re: [freetds] cast to void?,
Daniel Corbe, 12/03/2007
Archive powered by MHonArc 2.6.24.