]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools
authorBi, Dandan <dandan.bi@intel.com>
Tue, 12 Sep 2017 08:56:14 +0000 (16:56 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 12 Sep 2017 09:22:05 +0000 (17:22 +0800)
commit0b4c8f003ade95f4eadb8cbe7efe16008368143e
tree3690ad0d08ff537977292591b76dac9981bb4483
parent1f4807074005a43dc01eca8f1a1d4884fdf9d8a9
MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

V3: Remove one unnecessay type cast in patch 1.
Codes:
if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) {
  Offset = ReadFileInfo->FilePosition - FilePosition;
  if (Offset < 0) {
    Offset = -(Offset)
  }
...
}
Offset is UINT64 can not < 0, so the code logic may have some issue.
and Offset = -(Offset) may build failure in some circumstance.
Previously type cast Offset to INT64 to fix build break. Now remove
the type cast. Then can to check the code logic later.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c