audk/MdePkg
Laszlo Ersek cce01f538f MdePkg/BaseLib: Base64Decode(): don't declare variables in nested blocks
The EDK II C Coding Standards Specification (v2.20) strongly discourages
variable declarations in nested block scope:

5       Source Files
5.4     Code File Structure
5.4.1   Scoping Rules
5.4.1.1 Scope

> Block (local) Scope
>
> [...]
>
> Data declarations may follow the opening brace of a compound statement,
> regardless of nesting depth, and before any code generating statements
> have been entered. Other than at the outermost block of a function body,
> this type of declaration is strongly discouraged.

Hoist such variable declarations in Base64Decode() to the outermost
function scope.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Fixes: 35e242b698
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1980
Reported-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daude <philmd@redhat.com>
2019-07-17 16:36:57 +02:00
..
Include MdePkg/BaseLib: re-specify Base64Decode(), and add temporary stub impl 2019-07-16 23:04:15 +02:00
Library MdePkg/BaseLib: Base64Decode(): don't declare variables in nested blocks 2019-07-17 16:36:57 +02:00
MdePkg.dec MdePkg: Add new MM MP Protocol definition. 2019-07-16 11:54:55 +08:00
MdePkg.dsc MdePkg: Merge TianoCustomDecompress algorithm into 2019-05-15 20:48:26 +08:00
MdePkg.uni MdePkg: Add PcdSpeculationBarrierType 2019-04-30 16:39:09 -07:00
MdePkgExtra.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00