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

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -