summaryrefslogtreecommitdiff
path: root/common/spi_nor.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2016-10-26 13:50:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-12-16 15:42:16 -0800
commitec5c396b470ef8781738b008bfa86e10d0f5f924 (patch)
treef0a8986fd21fc958d77c4311990e5ef139917ba7 /common/spi_nor.c
parent6354dc7cd1a597cba12ecabe1e0821001c723308 (diff)
downloadchrome-ec-ec5c396b470ef8781738b008bfa86e10d0f5f924.tar.gz
i2cs.c: Initialize variable to fix GCC warnings
word_in_value shouldn't be able to be used without being initialized, so just initialize it to make GCC 5.3 happy. It's configured separately in the (last_write_pointer & 3) and (!(last_write_pointer & 3)) paths, so it can't actually slip through uninitialized. There is probably a way to rwrite this that won't confuse GCC as much, but I haven't found it yet. The solutions I did try generally ended up increasing the binary size, so I'm falling back to just initializing the variable. chip/g/i2cs.c: In function '_i2cs_write_complete_int': chip/g/i2cs.c:178:19: error: 'word_in_value' may be used uninitialized in this function [-Werror=maybe-uninitialized] This does not change the size of any ec.*.flat file. BRANCH=none BUG=none TEST=build succeeds under GCC 4.9.2, 5.3 and 6.2 Change-Id: Iaf8641b3d252c494ad13fbeb8ad8ece3cdfe6e76 Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/403504 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'common/spi_nor.c')
0 files changed, 0 insertions, 0 deletions