File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export fn sdfgen_dtb_parse(path: [*c]u8) ?*anyopaque {
79
79
log .err ("could not stat DTB '{s}' for parsing with error: {any}" , .{ path , e });
80
80
return null ;
81
81
};
82
- const bytes = file .reader ().readAllAlloc (allocator , stat .size ) catch | e | {
82
+ const bytes = file .reader ().readAllAlloc (allocator , @intCast ( stat .size ) ) catch | e | {
83
83
log .err ("could not read DTB '{s}' for parsing with error: {any}" , .{ path , e });
84
84
return null ;
85
85
};
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ pub fn probe(allocator: Allocator, path: []const u8) !void {
149
149
log .err ("failed to stat driver config file: {s}: {}" , .{ config_path , e });
150
150
return e ;
151
151
};
152
- const config_bytes = try config_file .reader ().readAllAlloc (allocator , config_file_stat .size );
152
+ const config_bytes = try config_file .reader ().readAllAlloc (allocator , @intCast ( config_file_stat .size ) );
153
153
// TODO; free config? we'd have to dupe the json data when populating our data structures
154
154
assert (config_bytes .len == config_file_stat .size );
155
155
// TODO: should probably free the memory at some point
You can’t perform that action at this time.
0 commit comments