diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-07-10 17:08:05 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-07-10 17:08:05 +0000 |
commit | 9777fa5926b7e85b1d728000efe9157dab350d1f (patch) | |
tree | 7bf379a428a8d34c306d04137615765dfda19fb2 /lib | |
parent | 52d0683c705d0402085901633029164314404fe5 (diff) |
[gcov] Fix fallout from r336693
Fix building GCDAProfiling.c with pre-C99 compilers.
This caused a build bot failure.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/profile/GCDAProfiling.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c index 9e9c60e80..5e32fc47f 100644 --- a/lib/profile/GCDAProfiling.c +++ b/lib/profile/GCDAProfiling.c @@ -210,11 +210,12 @@ static uint32_t read_32bit_value() { static uint32_t read_le_32bit_value() { uint32_t val = 0; + int i; if (new_file) return (uint32_t)-1; - for (int i = 0; i < 4; i++) + for (i = 0; i < 4; i++) val |= write_buffer[cur_pos++] << (8*i); return val; } |