[Xcb] problem in xcb_conn.c, xcb_out.c, xcb_in.c
Vincent.Torri at iecn.u-nancy.fr
Sat Mar 4 16:23:18 PST 2006
> > 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.
I have indeed such defined variable.
> 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
Ok, i'll re-read it. And i'll re-install xcb from the very beginning
> > 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.
all warnings are worth looking at. Maybe they may not imply potential
> > 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.
ha, right, I usually add -W during compilation. It warns about unused
parameters. I usually use it with -Wall. Then if the parameter is really
unused, I use the __unused__ attribute (with a #define)
> > 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.
I don't like using such "features". I don't like the compiler doing such
things itself. In addition, i'm not sure that the code will be compiled
with gcc 2.9* compilers.
> So your compiler is being excessively pedantic. Make it stop. :-)
hmm, removing -pedantic, then ? ;) just kidding :) My compiler is gcc
4.0.2. I like it to be pedantic. It helped me finding bugs ;) In
particular with signed/unsigned warnings, for example, in one of my
I like a code being compiled without any warning. Just my very humble
I have added in bugzilla those bugs. But you should be already aware of
More information about the Xcb