forked from auracaster/openocd
pld: fix new warnings from sparse
The new committed files add some warning from the static analyser 'sparse': - Don't assign pointer to 0, use NULL. - switch with no cases. Fix them. Change-Id: I2c02d629bd80b71c8e42553be5d9388bb9b6bcd0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7668 Tested-by: jenkins
This commit is contained in:
@@ -29,7 +29,7 @@ static int lattice_read_bit_file(struct lattice_bit_file *bit_file, const char *
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
bit_file->part = 0;
|
||||
bit_file->part = NULL;
|
||||
bit_file->has_id = false;
|
||||
enum read_bit_state state = SEEK_HEADER_START;
|
||||
for (size_t pos = 1; pos < bit_file->raw_bit.length && state != DONE; ++pos) {
|
||||
|
||||
Reference in New Issue
Block a user