[PATCH:xscope 06/24] SaveBytes: drop unnecessary casts in bcopy() call

Alan Coopersmith alan.coopersmith at oracle.com
Fri Aug 31 22:17:48 PDT 2012


Clears gcc warning from casting a const char * to char *:
server.c: In function `SaveBytes':
server.c:203: warning: cast discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 server.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server.c b/server.c
index b0019ee..efeae56 100644
--- a/server.c
+++ b/server.c
@@ -203,9 +203,9 @@ SaveBytes(FD fd, const unsigned char *buf, long n)
     }
 
     /* now copy the new bytes onto the end of the old bytes */
-    bcopy( /* from  */ (char *) buf,
-          /* to    */ (char *) (CS[fd].SavedBytes + CS[fd].NumberofSavedBytes),
-          /* count */ (int) n);
+    bcopy(/* from  */ buf,
+          /* to    */ (CS[fd].SavedBytes + CS[fd].NumberofSavedBytes),
+          /* count */ n);
     CS[fd].NumberofSavedBytes += n;
 }
 
-- 
1.7.9.2



More information about the xorg-devel mailing list