audk/MdeModulePkg
Hao Wu 5317e9ccaf MdeModulePkg/UdfDxe: Handle dead codes in FileSystemOperations.c
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1249

We found potential dead codes within File.c during the code coverage test.

After manual review, we think the below ones are positive reports:

A. For function GetAllocationDescriptor():
Due to the all the calling places for this function, the input parameter
'RecordingFlags' can only with value 'LongAdsSequence' or
'ShortAdsSequence'. Moreover, this is also mentioned in the function
description comments for GetAllocationDescriptor().

So the below code will never be reached:

  return EFI_DEVICE_ERROR;

This commit will add "ASSERT (FALSE);" before the above line to indicate
this and thus matching the function description comments.

B. For function GetAllocationDescriptorLsn():
Due to the all the calling places for this function, the input parameter
'RecordingFlags' can only with value 'LongAdsSequence' or
'ShortAdsSequence'. Moreover, this is also mentioned in the function
description comments for GetAllocationDescriptorLsn().

So the below code will never be reached:

  return EFI_UNSUPPORTED;

This commit will add "ASSERT (FALSE);" before the above line to indicate
this and thus matching the function description comments.

Cc: Paulo Alcantara <palcantara@suse.de>
Cc: Paulo Alcantara <paulo@paulo.ac>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-10-18 09:13:40 +08:00
..
Application MdeModulePkg CapsuleApp:Remove two redundant Guids 2018-09-21 11:34:42 +08:00
Bus MdeModulePkg/UsbMass: Reject device whose block size is 0 or > 64K 2018-10-17 11:04:06 +08:00
Core MdeModulePkg/DxeIpl: support more NX related PCDs 2018-09-26 08:55:10 +08:00
Include MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Library MdeModulePkg: Update Brotli DecompressLib to the latest v1.0.6 2018-10-09 22:28:16 +08:00
Logo MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
Universal MdeModulePkg/UdfDxe: Handle dead codes in FileSystemOperations.c 2018-10-18 09:13:40 +08:00
MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec/.uni: clarify PCDs usage 2018-09-26 08:55:09 +08:00
MdeModulePkg.dsc MdeModulePkg BrotliCustomDecompressLib: Don't build it for EBC arch 2018-10-15 15:55:55 +08:00
MdeModulePkg.uni MdeModulePkg/MdeModulePkg.dec/.uni: clarify PCDs usage 2018-09-26 08:55:09 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00