[PATCH 10/27] lib: fwts_json.h: fix casting warning, add missing const

Colin King colin.king at canonical.com
Wed Aug 15 13:11:12 UTC 2018


From: Colin Ian King <colin.king at 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 at 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
-- 
2.17.1




More information about the fwts-devel mailing list