Commit 578c21e6 authored by Paul Eggert's avatar Paul Eggert

Remove unnecessary casts.

* xterm.c (x_term_init):
* xfns.c (x_set_border_pixel):
* widget.c (create_frame_gcs): Remove casts to unsigned long etc.
These aren't needed now that we assume ANSI C.
parent 96f53c6c
2011-06-13 Paul Eggert <eggert@cs.ucla.edu>
Remove unnecessary casts.
* xterm.c (x_term_init):
* xfns.c (x_set_border_pixel):
* widget.c (create_frame_gcs): Remove casts to unsigned long etc.
These aren't needed now that we assume ANSI C.
* sound.c (Fplay_sound_internal): Remove cast to unsigned long.
It's more likely to cause problems (due to unsigned overflow)
than to cure them.
......
......@@ -523,14 +523,11 @@ create_frame_gcs (ew)
struct frame *s = ew->emacs_frame.frame;
s->output_data.x->normal_gc
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
(unsigned long)0, (XGCValues *)0);
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
s->output_data.x->reverse_gc
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
(unsigned long)0, (XGCValues *)0);
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
s->output_data.x->cursor_gc
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
(unsigned long)0, (XGCValues *)0);
= XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
s->output_data.x->black_relief.gc = 0;
s->output_data.x->white_relief.gc = 0;
}
......@@ -589,8 +586,7 @@ setup_frame_gcs (EmacsFrame ew)
= XCreatePixmapFromBitmapData (XtDisplay(ew),
RootWindowOfScreen (XtScreen (ew)),
setup_frame_cursor_bits, 2, 2,
(unsigned long)0, (unsigned long)1,
ew->core.depth);
0, 1, ew->core.depth);
/* Normal video */
gc_values.foreground = ew->emacs_frame.foreground_pixel;
......
......@@ -1074,8 +1074,7 @@ x_set_border_pixel (struct frame *f, int pix)
if (FRAME_X_WINDOW (f) != 0 && f->border_width > 0)
{
BLOCK_INPUT;
XSetWindowBorder (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
(unsigned long)pix);
XSetWindowBorder (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), pix);
UNBLOCK_INPUT;
if (FRAME_VISIBLE_P (f))
......
......@@ -10268,7 +10268,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
= XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
gray_bitmap_bits,
gray_bitmap_width, gray_bitmap_height,
(unsigned long) 1, (unsigned long) 0, 1);
1, 0, 1);
}
#ifdef HAVE_X_I18N
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment