diff --git a/test/checkers.cxx b/test/checkers.cxx index 95e670cf0..24dd47ca0 100644 --- a/test/checkers.cxx +++ b/test/checkers.cxx @@ -1305,7 +1305,7 @@ int didabort(void) { } int main(int argc, char **argv) { - seed = time(0); + seed = (int)time(0); newgame(); #ifdef BOTH fl_register_images(); diff --git a/test/cube.cxx b/test/cube.cxx index c067d49ea..733af20da 100644 --- a/test/cube.cxx +++ b/test/cube.cxx @@ -100,14 +100,14 @@ void cube_box::draw() { glEnable(GL_DEPTH_TEST); glFrustum(-1,1,-1,1,2,10000); glTranslatef(0,0,-10); - glClearColor(0.4, 0.4, 0.4, 0); + glClearColor(0.4f, 0.4f, 0.4f, 0); } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(float(lasttime*1.6),0,0,1); glRotatef(float(lasttime*4.2),1,0,0); glRotatef(float(lasttime*2.3),0,1,0); - glTranslatef(-1.0, 1.2f, -1.5); + glTranslatef(-1.0f, 1.2f, -1.5f); glScalef(float(size),float(size),float(size)); drawcube(wire); glPopMatrix(); diff --git a/test/offscreen.cxx b/test/offscreen.cxx index b22218fc1..c43ffaad4 100644 --- a/test/offscreen.cxx +++ b/test/offscreen.cxx @@ -33,7 +33,7 @@ static const int win_size = 512; static const int first_useful_color = 56; static const int last_useful_color = 255; static const int num_iterations = 300; -static const double max_line_width = 9.0; +static const int max_line_width = 9; static const double delta_time = 0.1; /*****************************************************************************/ @@ -256,7 +256,7 @@ int main(int argc, char **argv) main_window->show(argc, argv); - srand(time(NULL)); // seed the random sequence generator + srand((unsigned int)time(NULL)); // seed the random sequence generator Fl::add_timeout(delta_time, oscr_anim); diff --git a/test/unittest_simple_terminal.cxx b/test/unittest_simple_terminal.cxx index bfda6fe1c..645f99685 100644 --- a/test/unittest_simple_terminal.cxx +++ b/test/unittest_simple_terminal.cxx @@ -88,7 +88,7 @@ public: { 0x33333300, FL_COURIER_BOLD, 14 }, // "\033[8m" 8 white 20% { 0x1a1a1a00, FL_COURIER_BOLD, 14 }, // "\033[9m" 9 white 10% }; - int tty_h = (h/3.5); + int tty_h = (int)(h/3.5); int tty_y1 = y+(tty_h*0)+20; int tty_y2 = y+(tty_h*1)+40; int tty_y3 = y+(tty_h*2)+60; diff --git a/test/utf8.cxx b/test/utf8.cxx index f4b8ff3c7..062e4ba74 100644 --- a/test/utf8.cxx +++ b/test/utf8.cxx @@ -324,8 +324,8 @@ static void create_font_widget() ulong c; for (c = ' '+1; c < 127; c++) { if (!(c&0x1f)) label[i++]='\n'; - if (c=='@') label[i++]=c; - label[i++]=c; + if (c == '@') label[i++] = '@'; + label[i++] = (char)c; } label[i++] = '\n'; for (c = 0xA1; c < 0x600; c += 9) { @@ -491,8 +491,8 @@ public: void drawtext(int X, int Y, int W, int H) { fl_color(textcolor()); fl_font(textfont(), textsize()); - fl_rtl_draw(value(), strlen(value()), - X + W, Y + fl_height() -fl_descent()); + fl_rtl_draw(value(), (int)strlen(value()), + X + W, Y + fl_height() - fl_descent()); } }; @@ -570,8 +570,8 @@ int main(int argc, char** argv) "\x41\x42\x43\x61\x62\x63\xe0\xe8\xe9\xef\xe2\xee\xf6\xfc\xe3\x31\x32\x33"; char *utf8 = (char*) malloc(strlen(latin1) * 5 + 1); - int l = fl_utf8froma(utf8, (strlen(latin1) * 5 + 1), latin1, strlen(latin1)); - + int l = fl_utf8froma(utf8, (unsigned int)strlen(latin1) * 5 + 1, + latin1, (unsigned int)strlen(latin1)); make_font_chooser(); extra_font = FL_TIMES_BOLD_ITALIC;