X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fhashtest.c;h=919a1091e8448c41889e149612d8f51c1159f232;hp=6e1b00b5785b7a55627608ec396741248c21b7ff;hb=03f728e5bb3630a54fffc4a2ff2f8dbfcce9088e;hpb=11ca5f62994c7a14c4e500510bd242e1e721f8be;ds=sidebyside diff --git a/test/hashtest.c b/test/hashtest.c index 6e1b00b5..919a1091 100644 --- a/test/hashtest.c +++ b/test/hashtest.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -30,7 +30,7 @@ * * Generate timing statistics for vertical-motion optimization. * - * $Id: hashtest.c,v 1.29 2008/08/16 17:26:44 tom Exp $ + * $Id: hashtest.c,v 1.31 2010/11/13 23:43:15 tom Exp $ */ #include @@ -86,7 +86,8 @@ genlines(int base) move(head_lines, 0); for (i = head_lines; i < LINES - foot_lines; i++) { - chtype c = (base - LO_CHAR + i) % (HI_CHAR - LO_CHAR + 1) + LO_CHAR; + chtype c = (chtype) ((base - LO_CHAR + i) % (HI_CHAR - LO_CHAR + 1) + + LO_CHAR); int hi = (extend_corner || (i < LINES - 1)) ? COLS : COLS - 1; for (j = 0; j < hi; j++) addch(c); @@ -140,10 +141,10 @@ run_test(bool optimized GCC_UNUSED) #endif if (reverse_loops) - for (ch = hi; ch >= lo; ch--) + for (ch = (char) hi; ch >= lo; ch--) one_cycle(ch); else - for (ch = lo; ch <= hi; ch++) + for (ch = (char) lo; ch <= hi; ch++) one_cycle(ch); }