shithub: cstory

Download patch

ref: b14e0939a929533612a9b7bb0d0ac23dd09b118b
parent: 6b98bffba1c8c3e0423348f9eb268e997585acc1
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Oct 29 08:08:47 EDT 2019

Shut up some Clang warnings in DoConfig

--- a/DoConfig/DoConfig.cpp
+++ b/DoConfig/DoConfig.cpp
@@ -44,7 +44,6 @@
 private:
 	Fl_Group *group;
 	Fl_Radio_Round_Button *buttons[6];
-	Fl_Group *label;
 };
 
 static char config_path[FILENAME_MAX];
@@ -72,7 +71,7 @@
 	this->group = new Fl_Group(140 + offset * 30, 150, 30, 180);
 	this->group->label(temp);
 	this->group->align(FL_ALIGN_TOP_LEFT);
-	for (char i = 0; i < 6; i++)
+	for (int i = 0; i < 6; i++)
 		this->buttons[i] = new Fl_Radio_Round_Button(140 + offset * 30, 150 + 30 * i, 30, 30);
 	this->group->end();
 }
@@ -79,10 +78,9 @@
 
 int RadioRow::value()
 {
-	char i;
-	for (i = 0; i < 6; i++)
+	for (int i = 0; i < 6; i++)
 		if (this->buttons[i]->value())
-			return (int)i;
+			return i;
 	return 0;
 }
 
@@ -135,7 +133,7 @@
 	if (!CharsToLong(config.useJoy))
 		joystuffcontainer->deactivate();
 
-	for (char i = 0; i < 8; i++)
+	for (int i = 0; i < 8; i++)
 	{
 		const unsigned long button = CharsToLong(config.buttons[i]);
 		if (button < 6 && button > 0)
@@ -154,7 +152,7 @@
 
 	LongToChars(displaychoice->value(), config.display);
 	LongToChars(joychoice->value(), config.useJoy);
-	for (char i = 0; i < 8; i++)
+	for (int i = 0; i < 8; i++)
 	{
 		const unsigned int button_lookup[6] = {0, 1, 2, 5, 3, 4};
 		LongToChars(button_lookup[joyRows[i]->value()] + 1, config.buttons[i]);
@@ -223,7 +221,7 @@
 
 	joystuffcontainer = new Fl_Group(10, 130, 380, 200);
 	joystuffcontainer->box(FL_THIN_DOWN_BOX);
-	for (char i = 0; i < 8; i++)
+	for (int i = 0; i < 8; i++)
 	{
 		joyRows[i] = new RadioRow(i);
 	}
--