From 5c076d066a6247353706abcbdf7f10fb71c10deb Mon Sep 17 00:00:00 2001 From: Axel CHEMIN Date: Wed, 9 Dec 2020 14:10:31 +0100 Subject: [PATCH] rm le warning de gcc sur l'assignation d'un const, avec des cast --- src/libusb_wrapper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libusb_wrapper.c b/src/libusb_wrapper.c index f925179..b996443 100644 --- a/src/libusb_wrapper.c +++ b/src/libusb_wrapper.c @@ -259,15 +259,15 @@ void getOurInterfaces(libusb_device *device, //itération des interfaces for (int indexInterface = 0; indexInterface < config->bNumInterfaces; indexInterface++) { - struct libusb_interface * interface = &config->interface[indexInterface]; + const struct libusb_interface * interface = &config->interface[indexInterface]; //todo use le descriptor pour avoir bInterfaceNumber? if(indexInterface==0){ - *int_hidjoy = interface; + *int_hidjoy = (struct libusb_interface *)interface; }else if(indexInterface==1){ - *int_leds = interface; + *int_leds = (struct libusb_interface *)interface; }else if(indexInterface==2){ - *int_vibrators = interface; + *int_vibrators = (struct libusb_interface *)interface; } //#define pour les indices correspondants aux interfaces -- libgit2 0.21.2