From 631cde9525764aacececc7b42de49e3d105830ce Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Thu, 17 Jan 2019 10:02:18 -0800 Subject: [PATCH] qcacmn: Add qdf_must_check function attribute Some compilers allow functions to be annotated such that a warning will be emitted if the return value of that function is not used. Allow the WLAN driver to leverage these annotations by introducing a wrapper in QDF, qdf_must_check. Change-Id: I9c1328ae904857717703aae3748b207967a8dd3d CRs-Fixed: 2382837 --- qdf/inc/qdf_types.h | 3 ++- qdf/linux/src/i_qdf_types.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qdf/inc/qdf_types.h b/qdf/inc/qdf_types.h index 904bfc50972a..6e6031d086c9 100644 --- a/qdf/inc/qdf_types.h +++ b/qdf/inc/qdf_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -30,6 +30,7 @@ #endif #endif +#define qdf_must_check __qdf_must_check /* Include Files */ #include diff --git a/qdf/linux/src/i_qdf_types.h b/qdf/linux/src/i_qdf_types.h index 4ab2c026a175..96f7e0c52a4e 100644 --- a/qdf/linux/src/i_qdf_types.h +++ b/qdf/linux/src/i_qdf_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -62,6 +62,8 @@ #include #endif +#define __qdf_must_check __must_check + typedef struct sg_table __sgtable_t; /*