From 55f3df268c0f6e2fabc055bef51c195e51dd8716 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 16 Nov 2021 21:21:23 +0100 Subject: Fix remaining VS compiler warnings in example programs --- examples/chart-simple.cxx | 2 +- examples/howto-drag-and-drop.cxx | 2 +- examples/progress-simple.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/chart-simple.cxx b/examples/chart-simple.cxx index 3f05b3631..6898ce005 100644 --- a/examples/chart-simple.cxx +++ b/examples/chart-simple.cxx @@ -31,7 +31,7 @@ Fl_Choice *G_choice = 0; // Fl_Choice callback for changing chart type() static void chart_type_cb(Fl_Widget *w, void*) { const Fl_Menu_Item *item = G_choice->mvalue(); // item picked - G_chart->type( item->argument() ); // apply change + G_chart->type( (uchar)item->argument() ); // apply change G_chart->redraw(); // printf("Choice: '%s', argument=%ld\n", G_choice->text(), item->argument()); } diff --git a/examples/howto-drag-and-drop.cxx b/examples/howto-drag-and-drop.cxx index 35a45ed25..856838d61 100644 --- a/examples/howto-drag-and-drop.cxx +++ b/examples/howto-drag-and-drop.cxx @@ -43,7 +43,7 @@ public: switch ( event ) { case FL_PUSH: { // do 'copy/dnd' when someone clicks on box const char *msg = "It works!"; - Fl::copy(msg,strlen(msg),0); + Fl::copy(msg, (int)strlen(msg), 0); Fl::dnd(); ret = 1; break; diff --git a/examples/progress-simple.cxx b/examples/progress-simple.cxx index e0536f417..4631e4e0d 100644 --- a/examples/progress-simple.cxx +++ b/examples/progress-simple.cxx @@ -48,7 +48,7 @@ void butt_cb(Fl_Widget *butt, void *data) { w->end(); // end adding to window // Computation loop.. for ( int t=1; t<=500; t++ ) { - progress->value(t/500.0); // update progress bar with 0.0 ~ 1.0 value + progress->value(float(t/500.0)); // update progress bar with 0.0 ~ 1.0 value char percent[10]; sprintf(percent, "%d%%", int((t/500.0)*100.0)); progress->label(percent); // update progress bar's label -- cgit v1.2.3