From 41e4c2720d11f599f0de86959da632746c7dbfbc Mon Sep 17 00:00:00 2001 From: tcr3dr Date: Thu, 4 Jun 2015 12:08:31 -0700 Subject: [PATCH] AP_Param: Explicitly casts AP_CLASSTYPE parameter. --- libraries/AP_Param/AP_Param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Param/AP_Param.h b/libraries/AP_Param/AP_Param.h index 4175885f2f..6c44743a87 100644 --- a/libraries/AP_Param/AP_Param.h +++ b/libraries/AP_Param/AP_Param.h @@ -40,7 +40,7 @@ #define AP_VAROFFSET(type, element) (((uintptr_t)(&((const type *)1)->element))-1) // find the type of a variable given the class and element -#define AP_CLASSTYPE(class, element) (((const class *) 1)->element.vtype) +#define AP_CLASSTYPE(class, element) ((uint8_t)(((const class *) 1)->element.vtype)) // declare a group var_info line #define AP_GROUPINFO(name, idx, class, element, def) { AP_CLASSTYPE(class, element), idx, name, AP_VAROFFSET(class, element), {def_value : def} }