[PATCH 1/4] xfree86: Avoid compiler warning for unused vars without systemd
Keith Packard
keithp at keithp.com
Thu Jul 24 16:39:18 PDT 2014
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 at keithp.com>
---
hw/xfree86/common/xf86platformBus.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 22e4603..9460399 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;
}
--
2.0.1
More information about the xorg-devel
mailing list