xfree86: Avoid compiler warning for unused vars without systemd

When systemd isn't being used, systemd_logind_release_fd is defined
as an empty macro, leaving the arguments unused. Fix the compiler
warnings by simply removing the local variables and referencing the
structure within the macro call.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Keith Packard 2014-07-18 11:19:01 -07:00
parent b063a185ab
commit bd4198b01f

View File

@ -348,7 +348,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp,
GDevPtr gdev, int flags, intptr_t match_data)
{
Bool foundScreen = FALSE;
int entity, fd, major, minor;
int entity;
if (gdev && gdev->screen == 0 && !xf86_check_platform_slot(dev))
return FALSE;
@ -374,10 +374,7 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp,
if (entity != -1) {
if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc ||
!drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) {
fd = dev->attribs->fd;
major = dev->attribs->major;
minor = dev->attribs->minor;
systemd_logind_release_fd(major, minor, fd);
systemd_logind_release_fd(dev->attribs->major, dev->attribs->minor, dev->attribs->fd);
dev->attribs->fd = -1;
dev->flags &= ~XF86_PDEV_SERVER_FD;
}