This was the only warning I could see while compiling Iris.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2821>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2821>
p->store = (brw_inst *)reralloc_size(p->mem_ctx, p->store, p->next_insn_offset);
assert(p->store);
- read(fd, p->store + start_offset, sb.st_size);
+ ssize_t ret = read(fd, p->store + start_offset, sb.st_size);
close(fd);
+ if (ret != sb.st_size) {
+ return false;
+ }
ASSERTED bool valid =
brw_validate_instructions(p->devinfo, p->store,