linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] get rid of bcopy warning
Date: Wed, 13 Aug 2003 11:36:35 -0700	[thread overview]
Message-ID: <20030813113635.3d3b71ce.shemminger@osdl.org> (raw)

Get rid of warning because internal definition of bcopy
conflicts with builtin.  The warning is probably a bogus
bug of GCC 3.2.3, but the workaround is simple.

Almost no driver really uses bcopy anyway, and no code
uses the return value.

diff -Nru a/lib/string.c b/lib/string.c
--- a/lib/string.c	Wed Aug 13 11:31:13 2003
+++ b/lib/string.c	Wed Aug 13 11:31:13 2003
@@ -432,14 +432,13 @@
  * You should not use this function to access IO space, use memcpy_toio()
  * or memcpy_fromio() instead.
  */
-char * bcopy(const char * src, char * dest, int count)
+void bcopy(const void * src, void * dest, size_t count)
 {
+ 	const char *s = src;
 	char *tmp = dest;
 
 	while (count--)
-		*tmp++ = *src++;
-
-	return dest;
+		*tmp++ = *s++;
 }
 #endif
 

             reply	other threads:[~2003-08-13 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-13 18:36 Stephen Hemminger [this message]
2003-08-13 19:20 ` [PATCH] get rid of bcopy warning Richard B. Johnson

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=20030813113635.3d3b71ce.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).