MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction
authorHao Wu <>
Tue, 13 Feb 2018 02:23:51 +0000 (10:23 +0800)
committerHao Wu <>
Wed, 14 Feb 2018 00:19:47 +0000 (08:19 +0800)
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 <>

No differences found