Message ID | 20180815131129.24146-11-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | [01/27] lib: fwts_framework: ensure src pointer is const | expand |
On 2018-08-15 06:11 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > We need to be comparing a const pointer, add in the missing const > to clean up a build warning. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_json.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/lib/include/fwts_json.h b/src/lib/include/fwts_json.h > index 82a0cc09..d81b60d4 100644 > --- a/src/lib/include/fwts_json.h > +++ b/src/lib/include/fwts_json.h > @@ -29,6 +29,6 @@ > * versions return NULL, so check for these. Sigh. > */ > #define FWTS_JSON_ERROR(ptr) \ > - ( (ptr == NULL) || ((json_object*)ptr == __FWTS_JSON_ERR_PTR__) ) > + ( (ptr == NULL) || ((const json_object *)ptr == __FWTS_JSON_ERR_PTR__) ) > > #endif > Acked-by: Alex Hung <alex.hung@canonical.com>
On 08/15/2018 09:11 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > We need to be comparing a const pointer, add in the missing const > to clean up a build warning. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_json.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/lib/include/fwts_json.h b/src/lib/include/fwts_json.h > index 82a0cc09..d81b60d4 100644 > --- a/src/lib/include/fwts_json.h > +++ b/src/lib/include/fwts_json.h > @@ -29,6 +29,6 @@ > * versions return NULL, so check for these. Sigh. > */ > #define FWTS_JSON_ERROR(ptr) \ > - ( (ptr == NULL) || ((json_object*)ptr == __FWTS_JSON_ERR_PTR__) ) > + ( (ptr == NULL) || ((const json_object *)ptr == __FWTS_JSON_ERR_PTR__) ) > > #endif Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/include/fwts_json.h b/src/lib/include/fwts_json.h index 82a0cc09..d81b60d4 100644 --- a/src/lib/include/fwts_json.h +++ b/src/lib/include/fwts_json.h @@ -29,6 +29,6 @@ * versions return NULL, so check for these. Sigh. */ #define FWTS_JSON_ERROR(ptr) \ - ( (ptr == NULL) || ((json_object*)ptr == __FWTS_JSON_ERR_PTR__) ) + ( (ptr == NULL) || ((const json_object *)ptr == __FWTS_JSON_ERR_PTR__) ) #endif