From: Scott <drmemory@3rivers.net>
To: linux-c-programming@vger.kernel.org
Subject: Re: Into the Void
Date: Wed, 26 Jan 2005 09:11:38 -0700 [thread overview]
Message-ID: <20050126161137.GA954@drmemory.local> (raw)
In-Reply-To: <OFCBCF8B9A.C4F17DCE-ON85256F95.004B650B@teal.com>
On Wed, Jan 26, 2005 at 08:45:09AM -0500, Jeff.Fellin@rflelect.com wrote:
>
> The reason you are getting the references to void is the function prototype
> for memcpy is:
>
> memcpy (void *dest, void *src, size_t n);
>
> You are passing char* pointers which are not void * pointers. You have to
> correct your arguments
> to remove the error messages. Please use man memcpy() for more details.
So I should use
memcpy ((void *) *data_buf, (void *) bp, len) [len] = '\0';
(len is already type size_t)
Or, I guess, to follow Ron's suggestion too:
((char*) memcpy ((void *) *data_buf, (void *) bp, len)) [len] = '\0';
Just curious as to what evil all of this extra typing is supposed to
be protecting me from?
next prev parent reply other threads:[~2005-01-26 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-26 13:45 Into the Void Jeff.Fellin
2005-01-26 16:11 ` Scott [this message]
2005-01-27 4:02 ` Ron Michael Khu
2005-01-27 17:01 ` Scott
-- strict thread matches above, loose matches on Subject: below --
2005-02-02 18:17 Huber, George K RDECOM CERDEC STCD SRI
2005-02-01 15:32 Huber, George K RDECOM CERDEC STCD SRI
2005-02-02 12:15 ` Glynn Clements
2005-01-27 17:58 Huber, George K RDECOM CERDEC STCD SRI
2005-01-28 4:36 ` Amit Dang
2005-01-26 16:02 Huber, George K RDECOM CERDEC STCD SRI
2005-01-26 0:09 Scott
2005-01-26 2:18 ` Ron Michael Khu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050126161137.GA954@drmemory.local \
--to=drmemory@3rivers.net \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.