mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-10 08:55:27 +00:00
a4167ee500
On some systems fread() is declared with attribute warn_unused_result and this results in a build warning: ----------------------------------------------------------------------- Building C object src/xrt/drivers/CMakeFiles/drv_ns.dir/north_star/ns_hmd.c.o .../src/xrt/drivers/north_star/ns_hmd.c: In function ‘ns_config_load’: .../src/xrt/drivers/north_star/ns_hmd.c:512:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] 512 | fread(json, 1, file_size, config_file); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------------------------------------------------------- Explicitly ignore the return value of that fread() to silence the warning. And while at it also close config_file in some error paths between fopen() and fclose() which where leaking the file pointer when jumping to the parse_error label. |
||
---|---|---|
.. | ||
android | ||
arduino | ||
daydream | ||
depthai | ||
dummy | ||
euroc | ||
hdk | ||
ht | ||
ht_ctrl_emu | ||
hydra | ||
illixr | ||
multi_wrapper | ||
north_star | ||
ohmd | ||
psmv | ||
psvr | ||
qwerty | ||
realsense | ||
remote | ||
sample | ||
survive | ||
ultraleap_v2 | ||
v4l2 | ||
vf | ||
vive | ||
wmr | ||
CMakeLists.txt | ||
meson.build |