projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d60861a
)
Fix "for loop initial declarations only in C99" compile error
author
Mark Drayton
<mbd@fb.com>
Tue, 21 Feb 2017 22:25:57 +0000
(22:25 +0000)
committer
Mark Drayton
<mbd@fb.com>
Tue, 21 Feb 2017 22:25:57 +0000
(22:25 +0000)
src/cc/bcc_elf.c
patch
|
blob
|
history
diff --git
a/src/cc/bcc_elf.c
b/src/cc/bcc_elf.c
index
7a82665
..
8a5136f
100644
(file)
--- a/
src/cc/bcc_elf.c
+++ b/
src/cc/bcc_elf.c
@@
-246,7
+246,8
@@
static int find_buildid(Elf *e, char *buildid) {
char *buf = (char *)data->d_buf + 16;
size_t length = data->d_size - 16;
- for (size_t i = 0; i < length; ++i) {
+ size_t i = 0;
+ for (i = 0; i < length; ++i) {
sprintf(buildid + (i * 2), "%02hhx", buf[i]);
}