[Xcb] problem in xcb_conn.c, xcb_out.c, xcb_in.c
Jamey Sharp
jamey at minilop.net
Sat Mar 4 11:48:08 PST 2006
On Sat, Mar 04, 2006 at 09:02:31AM +0100, Vincent Torri wrote:
> hey,
Hi Vincent!
> Btw, why using a posix type instead of a standard char *, as pad is
> defined by a char ?
Because on Solaris, struct iovec's iov_base field is defined as a
caddr_t, and a long time ago I had trouble with it. I think we have some
Solaris gurus on this list: perhaps somebody could tell me what I should
be using here? I need to cast away constness every once in a while.
> i've just tried to compile xcb. Here is the error:
>
> xcb_conn.c:76: erreur: 'caddr_t' undeclared (first use in this function)
Bart had similar problems the other day. I suspect you have an old copy
of xproto installed that's causing -D_XOPEN_SOURCE=500 to be defined.
You want the proto/X11 module from current X.org CVS instead.
The "Availability" section of http://xcb.freedesktop.org/ has recently
been updated for using X.org instead of the original modular tree.
Please re-read that section, and look over the X.org Modular Developer's
Guide.
> Same problem in xcb_out.c
>
> In xcb_in.c : xcb_in.c:218: erreur: 'fd_set' undeclared (first use in this
> function)
>
> adding #include <sys/select.h> solves the problem. Using sys/types.h is
> not good, as sys/select.h is only added when __USE_BSD is defined.
The standards seem to have changed since I started writing XCB. My
select(2) manual page says that <sys/select.h> is specified by POSIX
1003.1-2001, and I don't think that text was there the last time I
looked. :-)
> Finally, I add all the warnings that i've found (sorry, there are some
> french words) :
>
> (lots of "comparison between signed and unsigned" elided)
Those may be signs of actual bugs, but I'm not sure.
> xcb_auth.c: Hors de toute fonction :
> xcb_auth.c:203: attention : unused parameter 'sockname'
I wonder if you're building with a different configuration than I am?
I'd have expected to see that warning myself if it's correct.
> extensions/bigreq.c:10: attention : initialisation manquante
> extensions/bigreq.c:10: attention : (near initialization for
> 'XCBBigRequestsId.global_id')
I don't understand. "Missing initialization"? Let's see... yes, C99
section 6.7.8 #10 says, in part, "If an object that has static storage
duration is not initialized explicitly, then: ... if it has arithmetic
type, it is initialized to (positive or unsigned) zero;" and #19 says
"all subobjects that are not initialized explicitly shall be initialized
implicitly the same as objects that have static storage duration."
That's exactly the behavior I expected and wanted.
So your compiler is being excessively pedantic. Make it stop. :-)
--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060304/7a117993/attachment.pgp
More information about the Xcb
mailing list