Reduce warning count

This commit is contained in:
Vinyl Darkscratch 2018-03-05 14:10:47 -08:00
parent e01cb5694b
commit a28a4733c4
4 changed files with 146 additions and 145 deletions

View File

@ -90,7 +90,7 @@ raiseRbExc(const Exception &exc);
template<rb_data_type_t *rbType>
static VALUE classAllocate(VALUE klass)
{
return rb_data_typed_object_alloc(klass, 0, rbType);
return rb_data_typed_object_wrap(klass, 0, rbType);
}
template<class C>

View File

@ -283,7 +283,7 @@ void EventThread::process(RGSSThreadData &rtData)
break;
case SDL_TEXTINPUT:
if (rtData.inputText.length() < rtData.inputTextLimit) rtData.inputText += event.text.text;
if (rtData.inputText.length() < (size_t)(rtData.inputTextLimit)) rtData.inputText += event.text.text;
break;
case SDL_KEYDOWN :

View File

@ -68,7 +68,6 @@
GTK_RESPONSE_APPLY = -10,
GTK_RESPONSE_HELP = -11
} GtkResponseType;
#endif
/**
* xdg_user_dir_lookup_with_fallback:
@ -210,6 +209,7 @@
return strdup (fallback);
return NULL;
}
#endif
#else
#error "Operating system not detected."
#endif
@ -949,6 +949,7 @@ std::string Oneshot::textinput(const char* prompt, int char_limit, const char* f
// gInputTextTexture.loadFromRenderedText(threadData.inputText.c_str(), textColor, gRenderer, gFont);
std::vector<std::string> *fontNames = new std::vector<std::string>();
fontNames->push_back(fontName);
fontNames->push_back("VL Gothic");
Font *font = new Font(fontNames, 18);

View File

@ -1099,8 +1099,8 @@ SettingsMenu::SettingsMenu(RGSSThreadData &rtData)
const int bWidgetH = 64;
const int bWidgetY = winSize.y - layoutH*bWidgetH - 48;
for (int y = 0; y < layoutH; ++y)
for (int x = 0; x < layoutW; ++x)
for (int y = 0; y < (int)(layoutH); ++y)
for (int x = 0; x < (int)(layoutW); ++x)
{
int i = x*layoutH+y;
BindingWidget w(i, p, IntRect(x*bWidgetW, bWidgetY+y*bWidgetH,