diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-12-10 13:34:00 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2022-12-10 13:34:00 +0100 |
| commit | 98d97daf112906fe1732c6a7d9c5db946e0e8df5 (patch) | |
| tree | 18f494a68405343d85d58b4245247bcf69794315 | |
| parent | fa41211ccae24d75e940721bae68d3abe7f2e1ee (diff) | |
Fixes some implicit type cast warnings
| -rw-r--r-- | fluid/Fl_Function_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 10 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 4d3c34464..9affddb63 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -1224,7 +1224,7 @@ void Fl_Data_Type::write_code1() { message = "Can't include data from file. Can't open"; } else { fseek(f, 0, SEEK_END); - nData = ftell(f); + nData = (int)ftell(f); fseek(f, 0, SEEK_SET); if (nData) { data = (char*)calloc(nData, 1); diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 58d0aa368..8899902bf 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1370,7 +1370,7 @@ void color_menu_cb(Fl_Menu_Button* i, void *v) { if (v == LOAD) { if (current_widget->is_menu_item()) {i->deactivate(); return;} else i->activate(); } else { - Fl_Color d = i->mvalue()->argument(); + Fl_Color d = (Fl_Color)(i->mvalue()->argument()); if (d == c) return; c = d; color_common(c); @@ -1408,7 +1408,7 @@ void color2_menu_cb(Fl_Menu_Button* i, void *v) { if (v == LOAD) { if (current_widget->is_menu_item()) {i->deactivate(); return;} else i->activate(); } else { - Fl_Color d = i->mvalue()->argument(); + Fl_Color d = (Fl_Color)(i->mvalue()->argument()); if (d == c) return; c = d; color2_common(c); @@ -1442,7 +1442,7 @@ void labelcolor_cb(Fl_Button* i, void *v) { void labelcolor_menu_cb(Fl_Menu_Button* i, void *v) { Fl_Color c = current_widget->o->labelcolor(); if (v != LOAD) { - Fl_Color d = i->mvalue()->argument(); + Fl_Color d = (Fl_Color)(i->mvalue()->argument()); if (d == c) return; c = d; labelcolor_common(c); @@ -1789,7 +1789,7 @@ void textcolor_menu_cb(Fl_Menu_Button* i, void* v) { i->activate(); } else { c = i->color(); - Fl_Color d = i->mvalue()->argument(); + Fl_Color d = (Fl_Color)(i->mvalue()->argument()); if (d == c) return; c = d; textcolor_common(c); @@ -3264,7 +3264,7 @@ void Fl_Widget_Type::read_property(const char *c) { } else if (!strcmp(c,"class")) { subclass(read_word()); } else if (!strcmp(c,"shortcut")) { - int shortcut = strtol(read_word(),0,0); + int shortcut = (int)strtol(read_word(),0,0); if (is_button()) ((Fl_Button*)o)->shortcut(shortcut); else if (is_input()) ((Fl_Input_*)o)->shortcut(shortcut); else if (is_value_input()) ((Fl_Value_Input*)o)->shortcut(shortcut); diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 13225042f..61399e1f5 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -109,7 +109,7 @@ void grid_cb(Fl_Int_Input *i, long v) { void default_widget_size_cb(Fl_Round_Button *b, long size) { // Update the "normal" text size of new widgets... b->setonly(); - Fl_Widget_Type::default_size = size; + Fl_Widget_Type::default_size = (int)size; fluid_prefs.set("widget_size", Fl_Widget_Type::default_size); } |
