diff options
| author | Paul Eggert | 2013-12-07 15:04:10 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-07 15:04:10 -0800 |
| commit | 67840e6629754dc1a9196fed4910b58e4e7abd89 (patch) | |
| tree | 797c405b0afc688355bba15c4a71830f003e3c26 /src | |
| parent | 73c8ceea1ab335aae9221a671ae0959704669a52 (diff) | |
| download | emacs-67840e6629754dc1a9196fed4910b58e4e7abd89.tar.gz emacs-67840e6629754dc1a9196fed4910b58e4e7abd89.zip | |
Fix minor problems found by static checking.
* keyboard.c (poll_for_input_1, input_polling_used):
Define only if HAVE_NTGUI.
* xmenu.c (popup_activate_callback): Omit unnecessary
check against USE_X_TOOLKIT, which must be defined here anyway.
* xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
Now static.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/keyboard.c | 10 | ||||
| -rw-r--r-- | src/xmenu.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 3 | ||||
| -rw-r--r-- | src/xterm.h | 2 |
5 files changed, 21 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3072e2dcdec..c7776762b8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-12-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix minor problems found by static checking. | ||
| 4 | * keyboard.c (poll_for_input_1, input_polling_used): | ||
| 5 | Define only if HAVE_NTGUI. | ||
| 6 | * xmenu.c (popup_activate_callback): Omit unnecessary | ||
| 7 | check against USE_X_TOOLKIT, which must be defined here anyway. | ||
| 8 | * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]: | ||
| 9 | Now static. | ||
| 10 | |||
| 1 | 2013-12-07 Martin Rudalics <rudalics@gmx.at> | 11 | 2013-12-07 Martin Rudalics <rudalics@gmx.at> |
| 2 | 12 | ||
| 3 | * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup. | 13 | * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup. |
diff --git a/src/keyboard.c b/src/keyboard.c index b50c06b4154..913a277ca79 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1954,10 +1954,8 @@ int poll_suppress_count; | |||
| 1954 | 1954 | ||
| 1955 | static struct atimer *poll_timer; | 1955 | static struct atimer *poll_timer; |
| 1956 | 1956 | ||
| 1957 | /* Poll for input, so that we catch a C-g if it comes in. This | 1957 | #ifdef HAVE_NTGUI |
| 1958 | function is called from x_make_frame_visible, see comment | 1958 | /* Poll for input, so that we catch a C-g if it comes in. */ |
| 1959 | there. */ | ||
| 1960 | |||
| 1961 | void | 1959 | void |
| 1962 | poll_for_input_1 (void) | 1960 | poll_for_input_1 (void) |
| 1963 | { | 1961 | { |
| @@ -1965,6 +1963,7 @@ poll_for_input_1 (void) | |||
| 1965 | && !waiting_for_input) | 1963 | && !waiting_for_input) |
| 1966 | gobble_input (); | 1964 | gobble_input (); |
| 1967 | } | 1965 | } |
| 1966 | #endif | ||
| 1968 | 1967 | ||
| 1969 | /* Timer callback function for poll_timer. TIMER is equal to | 1968 | /* Timer callback function for poll_timer. TIMER is equal to |
| 1970 | poll_timer. */ | 1969 | poll_timer. */ |
| @@ -2016,6 +2015,8 @@ start_polling (void) | |||
| 2016 | #endif | 2015 | #endif |
| 2017 | } | 2016 | } |
| 2018 | 2017 | ||
| 2018 | #ifdef HAVE_NTGUI | ||
| 2019 | |||
| 2019 | /* True if we are using polling to handle input asynchronously. */ | 2020 | /* True if we are using polling to handle input asynchronously. */ |
| 2020 | 2021 | ||
| 2021 | bool | 2022 | bool |
| @@ -2030,6 +2031,7 @@ input_polling_used (void) | |||
| 2030 | return 0; | 2031 | return 0; |
| 2031 | #endif | 2032 | #endif |
| 2032 | } | 2033 | } |
| 2034 | #endif | ||
| 2033 | 2035 | ||
| 2034 | /* Turn off polling. */ | 2036 | /* Turn off polling. */ |
| 2035 | 2037 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index d587610fdd7..fb3baa01ef4 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -510,9 +510,7 @@ static void | |||
| 510 | popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) | 510 | popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 511 | { | 511 | { |
| 512 | popup_activated_flag = 1; | 512 | popup_activated_flag = 1; |
| 513 | #ifdef USE_X_TOOLKIT | ||
| 514 | x_activate_timeout_atimer (); | 513 | x_activate_timeout_atimer (); |
| 515 | #endif | ||
| 516 | } | 514 | } |
| 517 | #endif | 515 | #endif |
| 518 | 516 | ||
diff --git a/src/xterm.c b/src/xterm.c index e8e69c666ee..90c7c36c44f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -248,6 +248,9 @@ static void x_sync_with_move (struct frame *, int, int, int); | |||
| 248 | static int handle_one_xevent (struct x_display_info *, | 248 | static int handle_one_xevent (struct x_display_info *, |
| 249 | const XEvent *, int *, | 249 | const XEvent *, int *, |
| 250 | struct input_event *); | 250 | struct input_event *); |
| 251 | #if ! (defined USE_X_TOOLKIT || defined USE_MOTIF) | ||
| 252 | static int x_dispatch_event (XEvent *, Display *); | ||
| 253 | #endif | ||
| 251 | /* Don't declare this _Noreturn because we want no | 254 | /* Don't declare this _Noreturn because we want no |
| 252 | interference with debugging failing X calls. */ | 255 | interference with debugging failing X calls. */ |
| 253 | static void x_connection_closed (Display *, const char *); | 256 | static void x_connection_closed (Display *, const char *); |
diff --git a/src/xterm.h b/src/xterm.h index 3d954fb8600..eff75403476 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -945,7 +945,9 @@ extern void x_clear_area (Display *, Window, int, int, int, int); | |||
| 945 | extern void x_mouse_leave (struct x_display_info *); | 945 | extern void x_mouse_leave (struct x_display_info *); |
| 946 | #endif | 946 | #endif |
| 947 | 947 | ||
| 948 | #if defined USE_X_TOOLKIT || defined USE_MOTIF | ||
| 948 | extern int x_dispatch_event (XEvent *, Display *); | 949 | extern int x_dispatch_event (XEvent *, Display *); |
| 950 | #endif | ||
| 949 | extern int x_x_to_emacs_modifiers (struct x_display_info *, int); | 951 | extern int x_x_to_emacs_modifiers (struct x_display_info *, int); |
| 950 | extern int x_display_pixel_height (struct x_display_info *); | 952 | extern int x_display_pixel_height (struct x_display_info *); |
| 951 | extern int x_display_pixel_width (struct x_display_info *); | 953 | extern int x_display_pixel_width (struct x_display_info *); |