mirror of https://github.com/acidanthera/audk.git
BaseTools/GenFw: Fix a bug for GCC build
current GCC build report error: 'for' loop initial declarations are only allowed in C99 or C11 mode, the patch fix this failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
aae1a87555
commit
a754c70cee
|
@ -314,7 +314,8 @@ GetSymName (
|
||||||
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;
|
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;
|
||||||
|
|
||||||
bool foundEnd = false;
|
bool foundEnd = false;
|
||||||
for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {
|
UINT32 i;
|
||||||
|
for (i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {
|
||||||
foundEnd = StrtabContents[i] == 0;
|
foundEnd = StrtabContents[i] == 0;
|
||||||
}
|
}
|
||||||
assert(foundEnd);
|
assert(foundEnd);
|
||||||
|
|
|
@ -306,7 +306,8 @@ GetSymName (
|
||||||
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;
|
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;
|
||||||
|
|
||||||
bool foundEnd = false;
|
bool foundEnd = false;
|
||||||
for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {
|
UINT32 i;
|
||||||
|
for (i= Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {
|
||||||
foundEnd = StrtabContents[i] == 0;
|
foundEnd = StrtabContents[i] == 0;
|
||||||
}
|
}
|
||||||
assert(foundEnd);
|
assert(foundEnd);
|
||||||
|
|
Loading…
Reference in New Issue