From: Hao Wu Date: Tue, 13 Feb 2018 02:23:51 +0000 (+0800) Subject: MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction X-Git-Tag: edk2-stable201903~2363 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=99576ee3fde9228dd5cfedd268f6bc82a0c9f732;hp=99576ee3fde9228dd5cfedd268f6bc82a0c9f732;ds=sidebyside MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction Since the pointer subtraction here is not performed by pointers to elements of the same array object. This might lead to potential issues, such behavior is undefined according to C11 standard. Refine the pointer subtraction expressions by casting each pointer to UINTN first and then perform the subtraction. Cc: Michael D Kinney Cc: Sean Brogan Cc: Jiewen Yao Cc: Eric Dong Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Star Zeng ---