public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix the error about loop initial declarations
@ 2018-01-02 13:39 Yonghong Zhu
  0 siblings, 0 replies; only message in thread
From: Yonghong Zhu @ 2018-01-02 13:39 UTC (permalink / raw)
  To: edk2-devel; +Cc: Yunhua Feng

From: Yunhua Feng <yunhuax.feng@intel.com>

We met compile error about loop initial declarations are only allowed
in C99 or C11 mode on GCC48/GCC49.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
---
 BaseTools/Source/C/DevicePath/DevicePath.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/DevicePath/DevicePath.c b/BaseTools/Source/C/DevicePath/DevicePath.c
index 4c87163..4baa612 100644
--- a/BaseTools/Source/C/DevicePath/DevicePath.c
+++ b/BaseTools/Source/C/DevicePath/DevicePath.c
@@ -104,11 +104,12 @@ Returns:
 
 
 void print_mem(void const *vp, size_t n)
 {
     unsigned char const *p = vp;
-    for (size_t i=0; i<n; i++) {
+    size_t i;
+    for (i = 0; i < n; i++) {
         printf("0x%02x ", p[i]);
   }
 }
 
 VOID
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-02 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-02 13:39 [Patch] BaseTools: Fix the error about loop initial declarations Yonghong Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox