xserver: Branch 'master'
Keith Packard
keithp at kemper.freedesktop.org
Fri Jul 18 08:32:39 PDT 2014
hw/xfree86/common/xf86platformBus.h | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit ac3acab1311c47cc73e2681e575f0407284c3c66
Author: Colin Walters <walters at verbum.org>
Date: Fri Jul 18 09:13:54 2014 -0400
xf86platformBus: Add assertion to avoid (fatal) compiler warning
Compilation of -video-intel started failing in gnome-continuous,
it's because xserver has -Werror=return-type on, and gcc can't
prove this function always returns a value:
/usr/include/xorg/xf86platformBus.h:119:1: error: control reaches end of non-void function [-Werror=return-type]
Let's add assertions to the accessor functions to fix this.
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h
index 2a90104..317dd24 100644
--- a/hw/xfree86/common/xf86platformBus.h
+++ b/hw/xfree86/common/xf86platformBus.h
@@ -115,6 +115,9 @@ _xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib
return xf86_platform_device_odev_attributes(device)->busid;
case ODEV_ATTRIB_DRIVER:
return xf86_platform_device_odev_attributes(device)->driver;
+ default:
+ assert(FALSE);
+ return NULL;
}
}
@@ -135,6 +138,9 @@ _xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int at
return xf86_platform_device_odev_attributes(device)->major;
case ODEV_ATTRIB_MINOR:
return xf86_platform_device_odev_attributes(device)->minor;
+ default:
+ assert(FALSE);
+ return 0;
}
}
More information about the xorg-commit
mailing list