silence clang "dead assignment" warnings

This commit is contained in:
Robin Gareus 2014-11-18 04:46:37 +01:00
parent 37937d9c69
commit 484e380536
2 changed files with 10 additions and 0 deletions

View File

@ -405,6 +405,8 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
// If you want to append more to the line, uncomment this first
// bufsize -= s;
assert(s <= buffer_size); // clang dead-assignment
fifo.write (&buf, 1);
if (g_atomic_int_get (const_cast<gint*> (&_update_queued)) == 0) {

View File

@ -285,6 +285,7 @@ smf_event_decode_metadata(const smf_event_t *event)
goto error;
}
assert (off < BUFFER_SIZE);
return (buf);
error:
@ -342,6 +343,7 @@ smf_event_decode_system_realtime(const smf_event_t *event)
return (NULL);
}
assert (off < BUFFER_SIZE);
return (buf);
}
@ -373,6 +375,7 @@ smf_event_decode_sysex(const smf_event_t *event)
} else {
off += snprintf(buf + off, BUFFER_SIZE - off, "SysEx, manufacturer 0x%x", manufacturer);
assert (off < BUFFER_SIZE);
return (buf);
}
@ -445,6 +448,7 @@ smf_event_decode_sysex(const smf_event_t *event)
else
off += snprintf(buf + off, BUFFER_SIZE - off, ", Unknown");
assert (off <= BUFFER_SIZE);
return (buf);
}
@ -487,6 +491,7 @@ smf_event_decode_system_common(const smf_event_t *event)
return (NULL);
}
assert (off < BUFFER_SIZE);
return (buf);
}
@ -583,6 +588,8 @@ smf_event_decode(const smf_event_t *event)
return (NULL);
}
assert(off <= BUFFER_SIZE);
return (buf);
}
@ -633,6 +640,7 @@ smf_decode(const smf_t *smf)
else
off += snprintf(buf + off, BUFFER_SIZE - off, "; division: %d FPS, %d resolution", smf->frames_per_second, smf->resolution);
assert (off < BUFFER_SIZE);
return (buf);
}