Comparison of signed and unsigned.

This commit is contained in:
William McBrine
2006-02-04 17:35:12 +00:00
parent f975a60951
commit c07c791d1c
2 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCx11 =
"$Id: pdcx11.c,v 1.40 2006/01/30 02:10:55 wmcbrine Exp $";
"$Id: pdcx11.c,v 1.41 2006/02/04 17:35:11 wmcbrine Exp $";
#endif
AppData app_data;
@@ -2078,7 +2078,7 @@ void SelectionSet(void)
length = end - start + 1;
}
if (length > tmpsel_length)
if (length > (int)tmpsel_length)
{
if (tmpsel_length == 0)
tmpsel = (char *)malloc(length + 1 +
@@ -2438,7 +2438,7 @@ void XCursesButton(Widget w, XEvent *event, String *params, Cardinal *nparams)
#ifdef MOUSE_DEBUG
printf("\nButtonPress\n");
#endif
if ((event->xbutton.time - last_button_press_time) <
if ((int)(event->xbutton.time - last_button_press_time) <
XCURSESDOUBLECLICKPERIOD)
{
MOUSE_X_POS = save_mouse_status.x;

View File

@@ -25,7 +25,7 @@
#ifdef PDCDEBUG
const char rcsid_x11 =
"$Id: x11.c,v 1.30 2006/01/30 02:10:55 wmcbrine Exp $";
"$Id: x11.c,v 1.31 2006/02/04 17:35:12 wmcbrine Exp $";
#endif
extern AppData app_data;
@@ -398,13 +398,13 @@ void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
case CURSES_SET_SELECTION:
say("CURSES_SET_SELECTION received from child\n");
if (read_socket(display_sock,buf,sizeof(long)) < 0)
if (read_socket(display_sock, buf, sizeof(long)) < 0)
XCursesExitXCursesProcess(5, SIGKILL,
"exiting from CURSES_TITLE XCursesProcessRequestsFromCurses");
memcpy((char *)&length, buf, sizeof(long));
if (length > tmpsel_length)
if (length > (long)tmpsel_length)
{
if (tmpsel_length == 0)
tmpsel = (char *)malloc(length + 1);