helper/binarybuffer: fix clang static analyzer warnings
Writing bits to an uninitialized buffer generated false warnings. Zero buffers before setting them by buf_set_u32|64() (do it only if bit-by-bit copy loop is used, zeroed buffer is not necessary if a fast path write is used) Change-Id: I2f7f8ddb45b0cbd08d3e249534fc51f4b5cc6694 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5383 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
@@ -149,7 +149,7 @@ static int or1k_tap_vjtag_init(struct or1k_jtag *jtag_info)
|
||||
* into the USER1 DR is sufficient to cover the most conservative case for m and n.
|
||||
*/
|
||||
|
||||
uint8_t t[4];
|
||||
uint8_t t[4] = { 0 };
|
||||
struct scan_field field;
|
||||
struct jtag_tap *tap = jtag_info->tap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user