OSDN Git Service

tools: Fix bccmd build with GCC 4.9
authorSzymon Janc <szymon.janc@gmail.com>
Wed, 2 Apr 2014 20:15:15 +0000 (22:15 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 3 Apr 2014 07:19:21 +0000 (10:19 +0300)
commit58c09774c82193b1dc958260f9d792068833a39a
tree0c6bf86f017a61681b7d04e7e70126d6448570f4
parentaddb76e7d3d5fecdaca3f6f3ae4d6f02dc6b6510
tools: Fix bccmd build with GCC 4.9

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