xfree86: Fix set but not used warnings in lnx_platform
Those warnings are generated, when building without systemd support: ../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’: ../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ ../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ In this case the functions are macros, which don't use theese arguments. v2: Add comments, why the warnings appear. Suggested by Emil Velikov Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Daniel Martin <consume.noise@gmail.com>
This commit is contained in:
parent
918afeecbc
commit
02981fe1a8
|
@ -26,19 +26,16 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
|||
drmSetVersion sv;
|
||||
drmVersionPtr v;
|
||||
char *buf;
|
||||
int major, minor, fd;
|
||||
int fd;
|
||||
int err = 0;
|
||||
Bool paused, server_fd = FALSE;
|
||||
|
||||
major = attribs->major;
|
||||
minor = attribs->minor;
|
||||
|
||||
fd = systemd_logind_take_fd(major, minor, path, &paused);
|
||||
fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused);
|
||||
if (fd != -1) {
|
||||
if (paused) {
|
||||
LogMessage(X_ERROR,
|
||||
"Error systemd-logind returned paused fd for drm node\n");
|
||||
systemd_logind_release_fd(major, minor, -1);
|
||||
systemd_logind_release_fd(attribs->major, attribs->minor, -1);
|
||||
return FALSE;
|
||||
}
|
||||
attribs->fd = fd;
|
||||
|
|
Loading…
Reference in New Issue
Block a user