ref: 7216263bb779cb4a31d457bae0503fc24e7300e2
parent: 396de0009d3a045f10e101efc2d3f1b8eb07ab16
author: Simon Howard <fraggle@gmail.com>
date: Wed Oct 11 19:03:19 EDT 2006
Shut up compiler warnings Subversion-branch: /trunk/chocolate-doom Subversion-revision: 695
--- a/textscreen/txt_spinctrl.c
+++ b/textscreen/txt_spinctrl.c
@@ -53,7 +53,7 @@
// 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 @@
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 @@
// 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 @@
// 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)
{
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -529,8 +529,8 @@
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!
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -362,8 +362,8 @@
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 @@
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;