Fixed warnings

This commit is contained in:
Louis-Antoine 2016-11-02 20:10:08 +01:00
parent 2d72b2fac6
commit 8b72b553be
2 changed files with 15 additions and 15 deletions

View File

@ -628,8 +628,8 @@ static void CON_DeleteSelectedText(void)
{
UINT32 i, j;
char *line = inputlines[inputline];
size_t selstart = min(input_cx, input_selection);
size_t selend = max(input_cx, input_selection);
size_t selstart = min(input_cx, (size_t)input_selection);
size_t selend = max(input_cx, (size_t)input_selection);
for (i = selstart, j = selend; line[j]; ++i, ++j)
line[i] = line[j];
@ -879,7 +879,7 @@ boolean CON_Responder(event_t *ev)
else
input_cx = 1;
if (input_cx == input_selection)
if ((INT32)input_cx == input_selection)
input_selection = -1;
return true;
@ -899,7 +899,7 @@ boolean CON_Responder(event_t *ev)
else
input_cx = strlen(inputlines[inputline]);
if (input_cx == input_selection)
if ((INT32)input_cx == input_selection)
input_selection = -1;
return true;
@ -991,7 +991,7 @@ boolean CON_Responder(event_t *ev)
else if (input_cx > 1)
input_cx--;
if (input_cx == input_selection)
if ((INT32)input_cx == input_selection)
input_selection = -1;
return true;
@ -1021,7 +1021,7 @@ boolean CON_Responder(event_t *ev)
else if (inputlines[inputline][input_cx])
input_cx++;
if (input_cx == input_selection)
if ((INT32)input_cx == input_selection)
input_selection = -1;
return true;
@ -1414,8 +1414,8 @@ static void CON_DrawInput(void)
}
else
{
size_t selstart = min(input_cx, input_selection);
size_t selend = max(input_cx, input_selection);
size_t selstart = min(input_cx, (size_t)input_selection);
size_t selend = max(input_cx, (size_t)input_selection);
for (c = 0, x = charwidth; c < selstart && c < con_width-11; c++, x += charwidth)
V_DrawCharacter(x, y, p[c] | f, !cv_allcaps.value);

View File

@ -631,8 +631,8 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
static void HU_DeleteSelectedText(void)
{
UINT32 i, j;
size_t selstart = min(chat_pos, chat_selection);
size_t selend = max(chat_pos, chat_selection);
size_t selstart = min(chat_pos, (size_t)chat_selection);
size_t selend = max(chat_pos, (size_t)chat_selection);
for (i = selstart, j = selend; w_chat[j]; ++i, ++j)
w_chat[i] = w_chat[j];
@ -645,7 +645,7 @@ static void HU_DeleteSelectedText(void)
// Handles key input and string input
//
static inline void HU_keyInChatString(char *s, UINT32 key, boolean shiftdown, boolean ctrldown)
static void HU_keyInChatString(UINT32 key, boolean shiftdown, boolean ctrldown)
{
switch (key)
{
@ -735,7 +735,7 @@ static inline void HU_keyInChatString(char *s, UINT32 key, boolean shiftdown, bo
chat_pos = strlen(w_chat);
}
if (chat_pos == chat_selection)
if ((INT32)chat_pos == chat_selection)
chat_selection = -1;
break;
// backspace or delete selected text
@ -883,7 +883,7 @@ boolean HU_Responder(event_t *ev)
}
else // if chat_on
{
HU_keyInChatString(w_chat, key, shiftdown, ctrldown);
HU_keyInChatString(key, shiftdown, ctrldown);
return true;
}
return false;
@ -963,8 +963,8 @@ static void HU_DrawChat(void)
}
else
{
size_t selstart = min(chat_pos, chat_selection);
size_t selend = max(chat_pos, chat_selection);
size_t selstart = min(chat_pos, (size_t)chat_selection);
size_t selend = max(chat_pos, (size_t)chat_selection);
while (i < selstart)
{