Hi, attached are just a couple of trivial patches to uvcvideo to suppress some compiler warnings - one related to a missing const, one related to pointer arithmetic done on a void *
On passing - i notice that in a couple of structs in uvcvideo.h you are used unnamed unions, which are a gcc extension which is not guaranteed to be supported in the future. I suppose that, besides convenience, the choice has been inspired by a similar pattern in videodev2.h . Before the use gets too widespread, it might be a good idea to use standard C and put a name to the union ? The changes to the source now are relatively small, and this would prevent the use of unnamed unions in derived works, which would require far more work to be fixed. cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, [EMAIL PROTECTED] . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-2217.533/600 . via Diotisalvi 2, 56122 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- diff -ubwr trunk/trunk/uvc_ctrl.c ./uvc_ctrl.c --- trunk/trunk/uvc_ctrl.c Wed Jan 31 23:53:36 2007 +++ ./uvc_ctrl.c Wed Jan 31 23:29:59 2007 @@ -795,6 +795,7 @@ mutex_unlock(&uvc_driver.ctrl_mutex); } +static void uvc_ctrl_add_mapping(struct uvc_control_mapping *mapping) { struct uvc_control_info *info; diff -ubwr trunk/trunk/uvc_driver.c ./uvc_driver.c --- trunk/trunk/uvc_driver.c Wed Jan 31 23:53:36 2007 +++ ./uvc_driver.c Wed Jan 31 21:36:15 2007 @@ -664,7 +664,7 @@ unit->type = VC_EXTENSION_UNIT; memcpy(unit->extension.guidExtensionCode, &buffer[4], 16); unit->extension.bNumControls = buffer[20]; - unit->extension.bNrInPins = le16_to_cpup((__le16*)&buffer[21]); + unit->extension.bNrInPins = le16_to_cpup((const __le16*)&buffer[21]); unit->extension.baSourceID = (__u8*)unit + sizeof *unit; memcpy(unit->extension.baSourceID, &buffer[22], p); unit->extension.bControlSize = buffer[22+p]; diff -ubwr trunk/trunk/uvcvideo.h ./uvcvideo.h --- trunk/trunk/uvcvideo.h Wed Jan 31 23:53:36 2007 +++ ./uvcvideo.h Wed Jan 31 23:23:50 2007 @@ -478,7 +478,7 @@ }; struct uvc_video_queue { - void *mem; + char *mem; /* we do pointer arithmetic here */ unsigned int streaming; __u32 sequence; __u8 last_fid; _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
