shithub: sf2mid

Download patch

ref: 6f9a3a0456b87cef869726f6546e87065bfa4663
parent: 347c18f8e6073c5836033e9f82054fab25afd5cd
author: Merlyn Morgan-Graham <kavika@gmail.com>
date: Tue Oct 9 21:15:31 EDT 2018

Fix C4703 (uninitialized variable) on MSVC 2015

The condition where this is used uninitialized shouldn't actually be reachable code, but MSVC doesn't seem to be able to figure that out

--- a/tsf.h
+++ b/tsf.h
@@ -1527,7 +1527,7 @@
 
 TSFDEF void tsf_channel_note_off(tsf* f, int channel, int key)
 {
-	struct tsf_voice *v = f->voices, *vEnd = v + f->voiceNum, *vMatchFirst = TSF_NULL, *vMatchLast;
+	struct tsf_voice *v = f->voices, *vEnd = v + f->voiceNum, *vMatchFirst = TSF_NULL, *vMatchLast = TSF_NULL;
 	for (; v != vEnd; v++)
 	{
 		//Find the first and last entry in the voices list with matching channel, key and look up the smallest play index