diff options
author | Keith Packard <keithp@keithp.com> | 2014-07-18 11:19:01 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-07-31 00:03:39 -0700 |
commit | bd4198b01f2baf2284e61ea7ebf4600f554800e9 (patch) | |
tree | 772a304aa914fbbfa9577e2a80f258486d51bede /hw | |
parent | b063a185ab9d2c54669fb6e036fdbae3707c9e4b (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86platformBus.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 22e4603e6..946039940 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -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; } |