|
From: Hans U. N. <hu...@n-...> - 2009-01-26 01:24:36
|
Apparently, in its current configuration doxygen drops the const part in
the libusb_get_pollfds definition. This leads to cases of
"initialization from incompatible pointer type"
errors when compiling strictly doc-complying code like
struct libusb_pollfd** pollfds = libusb_get_pollfds(ctx);
Changing that code line to
const struct libusb_pollfd** pollfds = libusb_get_pollfds(ctx);
will fix the issue, but cannot be derived from the docs at all.
From io.c, where the comment with the function description is located:
API_EXPORTED const struct libusb_pollfd **
libusb_get_pollfds(libusb_context *ctx)
From libusb.h:
const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx);
From http://libusb.sourceforge.net/api-1.0/group__poll.html:
struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx)
I'm not sure where this issue is to be fixed. The doxygen code and
libusb's doxygen config come to mind.
--
Hans Ulrich Niedermann
|