mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-29 04:25:57 +00:00
Violation 'Pointer arithmetic is not on array' occurs in following statement: *flags |= fl[pos - flagchars]; char flagchars[] is a well defined array. It could be used directly to avoid the pointer arithmetic. v1 -> v2: * use uint32_t rather than uint8_t for the index in order to let the type aligned with sizeof(flagchars) * add brackets to the then-block Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>