comparison src/xterm.c @ 111997:a5a188ddc758

Minor clean up to silence some gcc warnings. * src/window.c (Fset_window_buffer): * src/xterm.c (x_set_frame_alpha): Restructure code to silence compiler warning. (handle_one_xevent): Remove unused var `p'. (do_ewmh_fullscreen): Remove unused var `lval'. (xembed_set_info): Remove unused var `atom'. * src/textprop.c (Fremove_list_of_text_properties): Add braces to silence compiler warning. * src/fontset.c (fontset_id_valid_p, dump_fontset): * src/ftfont.c (ftfont_drive_otf): Modernize k&r declaration. * src/eval.c (Feval, Ffuncall): Avoid unneeded gotos. * src/dispnew.c (update_frame, update_frame_1): Compile the `do_pause' label only when it's used. * src/image.c (x_create_bitmap_from_xpm_data): * src/dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like its callers. * src/coding.c (detect_coding_utf_16): Remove unused vars `src_base' and `consumed_chars'. (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. (decode_coding_emacs_mule): Remove unused label `retry'. (detect_eol): Add parens to silence compiler warning. * src/alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where it's used to silence the compiler. (make_number): Modernize k&r declaration. (mark_char_table): Add parens to silence compiler warning.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 19 Dec 2010 00:43:42 -0500
parents 17d793ffe36f
children ac49e05bfcf2
comparison
equal deleted inserted replaced
111996:90a2d870e83e 111997:a5a188ddc758
487 0L, 1L, False, XA_CARDINAL, 487 0L, 1L, False, XA_CARDINAL,
488 &actual, &format, &n, &left, 488 &actual, &format, &n, &left,
489 &data); 489 &data);
490 490
491 if (rc == Success && actual != None) 491 if (rc == Success && actual != None)
492 if (*(unsigned long *)data == opac) 492 {
493 {
494 XFree ((void *) data);
495 x_uncatch_errors ();
496 return;
497 }
498 else
499 XFree ((void *) data); 493 XFree ((void *) data);
494 if (*(unsigned long *)data == opac)
495 {
496 x_uncatch_errors ();
497 return;
498 }
499 }
500 x_uncatch_errors (); 500 x_uncatch_errors ();
501 } 501 }
502 502
503 x_catch_errors (dpy); 503 x_catch_errors (dpy);
504 XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity, 504 XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
6496 6496
6497 if (nchars < nbytes) 6497 if (nchars < nbytes)
6498 { 6498 {
6499 /* Decode the input data. */ 6499 /* Decode the input data. */
6500 int require; 6500 int require;
6501 unsigned char *p;
6502 6501
6503 /* The input should be decoded with `coding_system' 6502 /* The input should be decoded with `coding_system'
6504 which depends on which X*LookupString function 6503 which depends on which X*LookupString function
6505 we used just above and the locale. */ 6504 we used just above and the locale. */
6506 setup_coding_system (coding_system, &coding); 6505 setup_coding_system (coding_system, &coding);
8467 static int 8466 static int
8468 do_ewmh_fullscreen (struct frame *f) 8467 do_ewmh_fullscreen (struct frame *f)
8469 { 8468 {
8470 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 8469 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8471 int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); 8470 int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
8472 Lisp_Object lval = get_frame_param (f, Qfullscreen);
8473 int cur, dummy; 8471 int cur, dummy;
8474 8472
8475 get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); 8473 get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
8476 8474
8477 /* Some window managers don't say they support _NET_WM_STATE, but they do say 8475 /* Some window managers don't say they support _NET_WM_STATE, but they do say
8990 /* XEmbed implementation. */ 8988 /* XEmbed implementation. */
8991 8989
8992 void 8990 void
8993 xembed_set_info (struct frame *f, enum xembed_info flags) 8991 xembed_set_info (struct frame *f, enum xembed_info flags)
8994 { 8992 {
8995 Atom atom;
8996 unsigned long data[2]; 8993 unsigned long data[2];
8997 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 8994 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8998 8995
8999 data[0] = XEMBED_VERSION; 8996 data[0] = XEMBED_VERSION;
9000 data[1] = flags; 8997 data[1] = flags;