Brad Hards wrote: > On Tuesday 14 July 2009 03:38:18 Nikos Mavrogiannopoulos wrote: >> I have solved the warnings except the transport_ptr cast. Most of them >> a bit different (I don't know how widely used i z for size_t, so I just >> casted size_t to int for printing). > Thanks. > I did some checking - looks like 'z' is in glibc, based on the SuSv3. I think > that might come from C99 - I don't have a copy to check. Not sure if it is > supported in C89. Which compilers / C libraries are supported for gnutls?
Actually it is C99 which is what gnutls is supposed to support. It could have been z as well. >> The former warning for cast is not >> easy to solve and not really needed on current platforms. Anyway I see >> Simon has added gl_fd_to_handle() that could be used with an inline >> function to perform this cast gracefully... but I don't really know if >> it is the proper place. > I also saw that it was identified as an issue some time ago. > http://www.mail-archive.com/[email protected]/msg00286.html > > Do you have any suggestions other than turning off -Werror? We would need something like: static inline void* int2ptr(int fd) { void* ret; memcpy(ret, &fd, sizeof(fd)); return ret; } static inline int ptr2int(void* ptr) { int fd; memcpy(&fd, ptr, sizeof(fd)); return fd; } However this interferes with the win32 emulation API, thus it might be better to have some suggestions from simon as well. regards, Nikos > Brad _______________________________________________ Help-gnutls mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnutls
