Browse Source

Merge pull request #708 from ThomasWaldmann/fix-compiler-warnings

fix compiler warnings, fixes #697
TW 9 years ago
parent
commit
592a1a80bc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      borg/_chunker.c

+ 2 - 2
borg/_chunker.c

@@ -208,7 +208,7 @@ chunker_process(Chunker *c)
         c->done = 1;
         if(c->remaining) {
             c->bytes_yielded += c->remaining;
-            return PyMemoryView_FromMemory(c->data + c->position, c->remaining, PyBUF_READ);
+            return PyMemoryView_FromMemory((char *)(c->data + c->position), c->remaining, PyBUF_READ);
         }
         else {
             if(c->bytes_read == c->bytes_yielded)
@@ -240,5 +240,5 @@ chunker_process(Chunker *c)
     c->last = c->position;
     n = c->last - old_last;
     c->bytes_yielded += n;
-    return PyMemoryView_FromMemory(c->data + old_last, n, PyBUF_READ);
+    return PyMemoryView_FromMemory((char *)(c->data + old_last), n, PyBUF_READ);
 }