Browse Source

Fix arithmetic on void*

Samuel Thibault 7 years ago
parent
commit
e0e4b3e2d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/disk_ops/disk_leveldb.cpp

+ 1 - 1
src/core/disk_ops/disk_leveldb.cpp

@@ -192,7 +192,7 @@ static int starpu_leveldb_write(void *base, void *obj, const void *buf, off_t of
 		memcpy(buffer, (void *) value_read, tmp->size);
 
 		/* put the new data on their new place */
-		memcpy(buffer + offset, (void *) buf_tmp, size);
+		memcpy((void *) ((uintptr_t) buffer + offset), (void *) buf_tmp, size);
 	}
 
 	/* and write them */