Skip to content

Commit 0a1dd11

Browse files
committed
Split declaration/assignment with label because it is not accepted by the compiler in Debian 10 and 11.
1 parent 68c6e03 commit 0a1dd11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/hal/drivers/mesa-hostmot2/hm2_modbus.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,9 @@ static void process(void *arg, long period)
761761
// Are we handling init commands?
762762
if(handling_inits(inst)) {
763763
// Yes, prepare and send
764+
hm2_modbus_cmd_t *cc;
764765
retry_next_init:
765-
hm2_modbus_cmd_t *cc = current_cmd(inst);
766+
cc = current_cmd(inst);
766767
if(0 == cc->cmd.func) {
767768
// Special meta command
768769
if(0 == cc->cmd.imetacmd) { // This is a delay command
@@ -1985,8 +1986,9 @@ static ssize_t read_mbccb(const hm2_modbus_inst_t *inst, const char *fname, hm2_
19851986
}
19861987

19871988
// Read the entire file
1989+
ssize_t err;
19881990
retry_read:
1989-
ssize_t err = read(fd, *pmbccb, sb.st_size);
1991+
err = read(fd, *pmbccb, sb.st_size);
19901992
if(err < 0) {
19911993
ssize_t rv = -errno;
19921994
if(errno == EINTR)

0 commit comments

Comments
 (0)