1
0
forked from drath/libratbag

etekcity-drv: fix compiler warning

we should not access resolution before it gets initialized...

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
This commit is contained in:
Benjamin Tissoires
2015-09-06 16:12:50 -04:00
parent cb50b53467
commit f8cb6e0f39

View File

@@ -503,9 +503,9 @@ etekcity_read_profile(struct ratbag_profile *profile, unsigned int index)
hz = report_rate;
if (!(setting_report->dpi_mask & (1 << i))) {
/* the profile is disabled, overwrite it */
resolution->dpi_x = 0;
resolution->dpi_y = 0;
resolution->hz = 0;
dpi_x = 0;
dpi_y = 0;
hz = 0;
}
resolution = ratbag_resolution_init(profile, i, dpi_x, dpi_y, hz);
ratbag_resolution_set_cap(resolution,