lkml.org 
[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] get rid of bcopy warning
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.045 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site