Suspicious pointer-to-pointer conversion (area too small) in C -
uint8_t *buf; uint16_t *ptr = (uint16_t *)buf;
i feel above code correct "suspicious pointer-to-pointer conversion (area small)" lint warning. knows how solve warning?
imho, don't cast pointer @ all. changes way (representation) variable (and corresponding memory) accessed, problematic.
if have to, cast value instead.
Comments
Post a Comment