OSDN Git Service

Doing math on void pointers isn't portable, reported by Nathan McSween.
authorRob Landley <rob@landley.net>
Sun, 8 Dec 2013 19:26:05 +0000 (13:26 -0600)
committerRob Landley <rob@landley.net>
Sun, 8 Dec 2013 19:26:05 +0000 (13:26 -0600)
lib/lib.c

index 14de91d..16c36b0 100644 (file)
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -67,7 +67,7 @@ ssize_t readall(int fd, void *buf, size_t len)
   size_t count = 0;
 
   while (count<len) {
-    int i = read(fd, buf+count, len-count);
+    int i = read(fd, (char *)buf+count, len-count);
     if (!i) break;
     if (i<0) return i;
     count += i;