pos = lseek(fd, 0, SEEK_CUR);
sprintf(errmsg, "read of file %s at pos %d for %lu bytes "
"returned %d: (%d) %s.\n",
- filename, pos, sizeof(buf), rc, errno, strerror(errno));
+ filename, pos, (unsigned long)sizeof(buf), rc, errno, strerror(errno));
FAIL(errmsg);
} else if (rc != sizeof(buf)) {
pos = lseek(fd, 0, SEEK_CUR);
sprintf(errmsg, "read of file %s at pos %d for %lu bytes "
"returned %d.\n",
- filename, pos, sizeof(buf), rc);
+ filename, pos, (unsigned long) sizeof(buf), rc);
FAIL(errmsg);
}
}
if (rc == -1) {
sprintf(errmsg, "write of file %s at pos %d for %lu bytes "
"returned %d: (%d) %s.\n",
- filename, pos, sizeof(buf), rc, errno, strerror(errno));
+ filename, pos, (unsigned long)sizeof(buf), rc, errno, strerror(errno));
FAIL(errmsg);
} else if (rc != sizeof(buf)) {
sprintf(errmsg, "write of file %s at pos %d for %lu bytes "
"returned %d.\n",
- filename, pos, sizeof(buf), rc);
+ filename, pos, (unsigned long)sizeof(buf), rc);
FAIL(errmsg);
}
}