More sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-09 23:46:54 -04:00
parent 0d1d069af4
commit ee695e71f9
218 changed files with 6282 additions and 3845 deletions

View File

@@ -408,7 +408,7 @@ midi_clear_buffer(void)
}
void
midi_in_handler(int set, void (*msg)(void *p, uint8_t *msg, uint32_t len), int (*sysex)(void *p, uint8_t *buffer, uint32_t len, int abort), void *p)
midi_in_handler(int set, void (*msg)(void *priv, uint8_t *msg, uint32_t len), int (*sysex)(void *priv, uint8_t *buffer, uint32_t len, int abort), void *priv)
{
midi_in_handler_t *temp = NULL;
midi_in_handler_t *next;
@@ -425,7 +425,7 @@ midi_in_handler(int set, void (*msg)(void *p, uint8_t *msg, uint32_t len), int (
memset(temp, 0, sizeof(midi_in_handler_t));
temp->msg = msg;
temp->sysex = sysex;
temp->p = p;
temp->priv = priv;
if (mih_last == NULL)
mih_first = mih_last = temp;
@@ -440,7 +440,7 @@ midi_in_handler(int set, void (*msg)(void *p, uint8_t *msg, uint32_t len), int (
if (temp == NULL)
break;
if ((temp->msg == msg) && (temp->sysex == sysex) && (temp->p == p)) {
if ((temp->msg == msg) && (temp->sysex == sysex) && (temp->priv == priv)) {
if (temp->prev != NULL)
temp->prev->next = temp->next;
@@ -500,7 +500,7 @@ midi_in_msg(uint8_t *msg, uint32_t len)
break;
if (temp->msg)
temp->msg(temp->p, msg, len);
temp->msg(temp->priv, msg, len);
temp = temp->next;
@@ -548,9 +548,9 @@ midi_do_sysex(void)
ret = 0;
if (temp->sysex) {
if (temp->cnt == 0)
ret = temp->sysex(temp->p, temp->buf, 0, 0);
ret = temp->sysex(temp->priv, temp->buf, 0, 0);
else
ret = temp->sysex(temp->p, temp->buf, temp->len, 0);
ret = temp->sysex(temp->priv, temp->buf, temp->len, 0);
}
/* If count is 0 and length is 0, then this is just a finishing