mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Initialize a few _cleanup_ pointers to NULL
../src/liblur.c:46:3: warning: 'd' may be used uninitialized in this function [-Wmaybe-uninitialized] hidpp10_device_destroy(*hidpp10_device); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/liblur.c:198:59: note: 'd' was declared here _cleanup_hidpp10_device_destroy_ struct hidpp10_device *d; And similar messages Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Jente Hidskes
parent
38f46a9be8
commit
e1ebf7ad1b
@@ -190,7 +190,7 @@ test_read_profile(struct ratbag_profile *profile)
|
||||
r0 = &p0->resolutions[0];
|
||||
|
||||
for (i = 0; i < d->num_resolutions; i++) {
|
||||
_cleanup_resolution_ struct ratbag_resolution *res;
|
||||
_cleanup_resolution_ struct ratbag_resolution *res = NULL;
|
||||
size_t nrates = 0;
|
||||
|
||||
r = &p->resolutions[i];
|
||||
@@ -225,7 +225,7 @@ test_read_profile(struct ratbag_profile *profile)
|
||||
|
||||
/* special case triggered by the test suite when num_resolutions is 0 */
|
||||
if (d->num_resolutions) {
|
||||
_cleanup_resolution_ struct ratbag_resolution *res;
|
||||
_cleanup_resolution_ struct ratbag_resolution *res = NULL;
|
||||
|
||||
res = ratbag_profile_get_resolution(profile, 0);
|
||||
assert(res);
|
||||
|
||||
Reference in New Issue
Block a user