Shut up compiler warnings

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 695
This commit is contained in:
Simon Howard 2006-10-11 23:03:19 +00:00
parent 396de0009d
commit 7216263bb7
3 changed files with 13 additions and 13 deletions

View file

@ -53,7 +53,7 @@ static void FloatFormatString(float step, char *buf)
// Number of characters needed to represent a character
static int IntWidth(int val)
static unsigned int IntWidth(int val)
{
char buf[25];
@ -62,10 +62,10 @@ static int IntWidth(int val)
return strlen(buf);
}
static int FloatWidth(float val, float step)
static unsigned int FloatWidth(float val, float step)
{
int precision;
int result;
unsigned int precision;
unsigned int result;
// Calculate the width of the int value
@ -73,7 +73,7 @@ static int FloatWidth(float val, float step)
// Add a decimal part if the precision specifies it
precision = (int) ceil(-log(step) / log(10));
precision = (unsigned int) ceil(-log(step) / log(10));
if (precision > 0)
{
@ -85,9 +85,9 @@ static int FloatWidth(float val, float step)
// Returns the minimum width of the input box
static int SpinControlWidth(txt_spincontrol_t *spincontrol)
static unsigned int SpinControlWidth(txt_spincontrol_t *spincontrol)
{
int minw, maxw;
unsigned int minw, maxw;
switch (spincontrol->type)
{

View file

@ -529,8 +529,8 @@ static void TXT_TableMousePress(TXT_UNCAST_ARG(table), int x, int y, int b)
if (widget != NULL)
{
if (x >= widget->x && x < widget->x + widget->w
&& y >= widget->y && y < widget->y + widget->h)
if (x >= widget->x && x < (signed) (widget->x + widget->w)
&& y >= widget->y && y < (signed) (widget->y + widget->h))
{
// This is the widget that was clicked!

View file

@ -362,8 +362,8 @@ static void MouseButtonPress(txt_window_t *window, int b)
widgets = (txt_widget_t *) window;
if (x >= widgets->x && x < widgets->x + widgets->w
&& y >= widgets->y && y < widgets->y + widgets->h)
if (x >= widgets->x && x < (signed) (widgets->x + widgets->w)
&& y >= widgets->y && y < (signed) (widgets->y + widgets->h))
{
TXT_WidgetMousePress(window, x, y, b);
}
@ -375,8 +375,8 @@ static void MouseButtonPress(txt_window_t *window, int b)
widget = (txt_widget_t *) window->actions[i];
if (widget != NULL
&& x >= widget->x && x < widget->x + widget->w
&& y >= widget->y && y < widget->y + widget->h)
&& x >= widget->x && x < (signed) (widget->x + widget->w)
&& y >= widget->y && y < (signed) (widget->y + widget->h))
{
TXT_WidgetMousePress(widget, x, y, b);
break;