Skip to content

Commit

Permalink
umockdev-record: Fix all_devices() type conversion
Browse files Browse the repository at this point in the history
Avoid directly accessing `.data()`, use the `.steal()` API instead which
does proper type coercion.

```
umockdev-record.c:418:27: note: expected ‘gchar **’ {aka ‘char **’} but argument is of type ‘void **’
../../source/src/umockdev-record.vala:64:72: error: pointer type mismatch in conditional expression [-Werror]
```
  • Loading branch information
martinpitt committed Mar 1, 2024
1 parent ea82705 commit b842b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/umockdev-record.vala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ all_devices ()
{
var devs = new GenericArray<string>();
devices_from_dir("/sys/devices", ref devs);
return devs.data;
return devs.steal();
}

// If dev is a block or character device, convert it to a sysfs path.
Expand Down

0 comments on commit b842b14

Please sign in to comment.