If we click button to enable DisplayOverOtherApps for monado, use
back button to com back to Launcher and hot-start monado app, the
disabled status fragment is not removed, and enabled status fraqgment is
added top on disabled status fragment, that causes text overlap.
This CL will use FragmentTransaction#replace instead of
FragmentTransaction#add to ensure there is only one
DisplayOverOtherAppsStatusFragment, and new status will replace old
status without any overlap.
Signed-off-by: utzcoz <utzcoz@outlook.com>
- Add CMakeUserPresets.json to .gitignore
- Fix DASSERTs warning for release builds
- Do not use one euro filter with invalid poses
- Other NFC style changes
A previous change didn't really ignore the return value of fread() and
a warning was still emitted:
-----------------------------------------------------------------------
[103/1571] 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:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
512 | (void)fread(json, 1, file_size, config_file);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Check the return value of fread to fix the warning for good, and declare
the return value of ftell as long as stated in the man page.
Add some missing returns pointed out by -Wreturn-type:
-----------------------------------------------------------------------
[75/1571] Building C object src/xrt/auxiliary/CMakeFiles/aux_util.dir/util/u_config_json.c.o
.../src/xrt/auxiliary/util/u_config_json.c: In function ‘u_gui_state_scene_to_string’:
.../src/xrt/auxiliary/util/u_config_json.c:524:1: warning: control reaches end of non-void function [-Wreturn-type]
524 | }
| ^
-----------------------------------------------------------------------
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.