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>
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;\r
\r
bool foundEnd = false;\r
- for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {\r
+ UINT32 i;\r
+ for (i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {\r
foundEnd = StrtabContents[i] == 0;\r
}\r
assert(foundEnd);\r
UINT8* StrtabContents = (UINT8*)mEhdr + StrtabShdr->sh_offset;\r
\r
bool foundEnd = false;\r
- for (UINT32 i = Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {\r
+ UINT32 i;\r
+ for (i= Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) {\r
foundEnd = StrtabContents[i] == 0;\r
}\r
assert(foundEnd);\r