Browse Source

AP_Param: fixed a compiler warning with -Wsign-conversion

master
Tobias 12 years ago committed by Andrew Tridgell
parent
commit
4a75351bd3
  1. 4
      libraries/AP_Param/AP_Param.cpp

4
libraries/AP_Param/AP_Param.cpp

@ -920,7 +920,7 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf @@ -920,7 +920,7 @@ AP_Param *AP_Param::next_group(uint8_t vindex, const struct GroupInfo *group_inf
*ptype = AP_PARAM_FLOAT;
}
uintptr_t ofs = (uintptr_t)PGM_POINTER(&_var_info[vindex].ptr) + PGM_UINT16(&group_info[i].offset);
ofs += sizeof(float)*(token->idx-1);
ofs += sizeof(float)*(token->idx - 1u);
return (AP_Param *)ofs;
}
}
@ -948,7 +948,7 @@ AP_Param *AP_Param::next(ParamToken *token, enum ap_var_type *ptype) @@ -948,7 +948,7 @@ AP_Param *AP_Param::next(ParamToken *token, enum ap_var_type *ptype)
if (ptype != NULL) {
*ptype = AP_PARAM_FLOAT;
}
return (AP_Param *)(((token->idx-1)*sizeof(float))+(uintptr_t)PGM_POINTER(&_var_info[i].ptr));
return (AP_Param *)(((token->idx - 1u)*sizeof(float))+(uintptr_t)PGM_POINTER(&_var_info[i].ptr));
}
if (type != AP_PARAM_GROUP) {

Loading…
Cancel
Save