diff options
author | Pierre Gondois <Pierre.Gondois@arm.com> | 2020-12-10 13:04:26 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-06 16:22:54 +0000 |
commit | fb48f1e2980bcca8fe75d30cacc73c6e00b109b8 (patch) | |
tree | d26bab063637beadce6b7a0593c5f6aa5bafe7ca /ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c | |
parent | 8b8b52ff0ca6123fff514381cd8766c11024460d (diff) | |
download | edk2-fb48f1e2980bcca8fe75d30cacc73c6e00b109b8.tar.gz edk2-fb48f1e2980bcca8fe75d30cacc73c6e00b109b8.tar.bz2 edk2-fb48f1e2980bcca8fe75d30cacc73c6e00b109b8.zip |
ArmPkg: Fix Ecc error 5007 in CompilerIntrinsicsLib
This patch fixes the following Ecc reported error:
There should be no initialization of a variable as
part of its declaration
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c')
-rw-r--r-- | ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c index c046b8be86..b88a5f2c5f 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memset_ms.c @@ -18,7 +18,9 @@ void* memset(void *, int, size_t); #pragma function(memset)
void *memset(void *s, int c, size_t n)
{
- unsigned char *d = s;
+ unsigned char *d;
+
+ d = s;
while (n-- != 0) {
*d++ = (unsigned char)c;
|