Skip to content

Commit

Permalink
[mts] Silence warnings about deprecated kernel structures
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 20, 2020
1 parent 0fde04f commit bb80513
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mts/transport/usb/mtp1descriptors.h
Expand Up @@ -12,6 +12,17 @@
#define MTP_EP_PATH_OUT "/dev/mtp/ep2"
#define MTP_EP_PATH_INTERRUPT "/dev/mtp/ep3"

/* Suppress warnings about deprecated kernel structures.
*
* This code needs to support devices with old kernels
* that use structures/types that have been marked as
* deprecated in later ones - which produces diagnostic
* noise when building for devices with recent enough
* kernels.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

struct mtp1_descs_s {
struct usb_interface_descriptor intf;
struct usb_endpoint_descriptor_no_audio mtp_ep_in;
Expand Down Expand Up @@ -56,4 +67,6 @@ struct mtp1_descriptors_s_incompatible {

extern const struct usb_functionfs_descs_head_incompatible mtp1descriptors_header_incompatible;

#pragma GCC diagnostic pop

#endif

0 comments on commit bb80513

Please sign in to comment.