[Xcb] [PATCH xcb] Added more error states and removed global error_connection
Uli Schlachter
psychon at znc.in
Fri Oct 28 10:31:34 PDT 2011
On 28.10.2011 17:16, Arvind Umrao wrote:
[...]
> +xcb_connection_t *_xcb_conn_ret_error(int err)
> {
> - c->has_error = 1;
> + static int error_connection;
> + error_connection = err;
> + return (xcb_connection_t *) &error_connection ;
> }
[...]
That doesn't look thread-safe to me. If you really want to go that way, you need
a seperate static variable for every possible error.
For https://bugs.freedesktop.org/show_bug.cgi?id=42304:
Do you know what causes that bug? Why does gcc complain about a static global
variable, but a static local one works fine?
Uli
--
- He made himself, me nothing, you nothing out of the dust
- Er machte sich mir nichts, dir nichts aus dem Staub
More information about the Xcb
mailing list