OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
addb76e
)
tools: Fix bccmd build with GCC 4.9
author
Szymon Janc
<szymon.janc@gmail.com>
Wed, 2 Apr 2014 20:15:15 +0000
(22:15 +0200)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Thu, 3 Apr 2014 07:19:21 +0000
(10:19 +0300)
Make sure accessing array[63 * 2 + 4] is legal.
tools/bccmd.c: In function ‘cmd_buildname’:
tools/bccmd.c:406:18: error: iteration 63u invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
name[i] = array[(i * 2) + 4];
tools/bccmd.c
patch
|
blob
|
history
diff --git
a/tools/bccmd.c
b/tools/bccmd.c
index
ff1b307
..
4649ad5
100644
(file)
--- a/
tools/bccmd.c
+++ b/
tools/bccmd.c
@@
-389,7
+389,7
@@
static int cmd_chiprev(int transport, int argc, char *argv[])
static int cmd_buildname(int transport, int argc, char *argv[])
{
- uint8_t array[13
0
];
+ uint8_t array[13
1
];
char name[64];
unsigned int i;
int err;