wayland scanner writes incorrect descriptions on i586
Olivier Blin
dev at blino.org
Sun Oct 14 15:47:33 PDT 2012
Hi,
On i586, wayland scanner writes incorrect descriptions in the header
files, see at the end of this mail for the first few differences between
the x86_64 header and the i586 one.
On i586, desc_dump() does not use the description passed after the
vsnprintf() parameters, but unrelated values.
It seems to be because desc_dump() is using the ap va_arg after being
passed to vsnprintf():
vsnprintf(buf, sizeof buf, fmt, ap);
desc = va_arg(ap, char *);
And according to vsnprintf(3) and stdarg(3), the value of ap is
undefined after the vsnprintf() call.
Couldn't the desc be moved as the first parameter of desc_dump()?
It fixes my issue when writing the headers for i586.
I will post a patch series doing that.
Regards
--- /usr/include/wayland-server-protocol.h 2012-10-10 11:38:40.000000000 +0200
+++ wayland-server-protocol-i586.h 2012-10-15 00:43:26.185498748 +0200
@@ -81,11 +81,10 @@
#ifndef WL_DISPLAY_ERROR_ENUM
#define WL_DISPLAY_ERROR_ENUM
/**
- * wl_display_error - global error values
- * @WL_DISPLAY_ERROR_INVALID_OBJECT: server couldn't find object
- * @WL_DISPLAY_ERROR_INVALID_METHOD: method doesn't exist on the
- * specified interface
- * @WL_DISPLAY_ERROR_NO_MEMORY: server is out of memory
+ * wl_display_error - wl_display
+ * @WL_DISPLAY_ERROR_INVALID_OBJECT: WL_DISPLAY
+ * @WL_DISPLAY_ERROR_INVALID_METHOD: WL_DISPLAY
+ * @WL_DISPLAY_ERROR_NO_MEMORY: WL_DISPLAY
*
* These errors are global and can be emitted in response to any server
* request.
@@ -98,20 +97,20 @@
#endif /* WL_DISPLAY_ERROR_ENUM */
/**
- * wl_display - core global object
- * @bind: bind an object to the display
- * @sync: asynchronous roundtrip
+ * wl_display - wl_display
+ * @bind: bind
+ * @sync: sync
*
* The core global object. This is a special singleton object. It is used
* for internal wayland protocol features.
*/
struct wl_display_interface {
/**
- * bind - bind an object to the display
- * @name: unique number id for object
- * @interface: (none)
- * @version: (none)
- * @id: (none)
+ * bind - bind
+ * @name: name
+ * @interface: interface
+ * @version: version
+ * @id: id
*
* Binds a new, client-created object to the server using @name
* as the identifier.
--
Olivier Blin - blino
More information about the wayland-devel
mailing list