diff options
| author | Juanma Barranquero | 2011-03-25 16:39:59 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2011-03-25 16:39:59 +0100 |
| commit | 0f4a96b5d7de244a7be6fc98f6a66d3d1e6a7569 (patch) | |
| tree | d378db1428c33eb26bcc78997af9f8db54f8c521 /src | |
| parent | f9e771e246a981bb3d37c65beb89d18bb407e0cd (diff) | |
| download | emacs-0f4a96b5d7de244a7be6fc98f6a66d3d1e6a7569.tar.gz emacs-0f4a96b5d7de244a7be6fc98f6a66d3d1e6a7569.zip | |
nt/*.c, src/*.c: Remove unused variables.
* nt/addpm.c (main): Remove unused variable `retval'.
* nt/preprep.c (main): Remove unused variable `ptr'.
* src/dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
* src/fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
and `suffix'.
(Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
of variables specific to SELinux and computation of `encoded_absname'.
* src/image.c (XPutPixel): Remove unused variable `height'.
* src/keyboard.c (make_lispy_event): Remove unused variable `hpos'.
* src/unexw32.c (get_section_info): Remove unused variable `section'.
* src/w32.c (stat): Remove unused variables `drive_root' and `devtype'.
(system_process_attributes): Remove unused variable `sess'.
(sys_read): Remove unused variable `err'.
* src/w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
(w32_wnd_proc): Remove unused variable `isdead'.
(unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
(Fx_server_max_request_size): Remove unused variable `dpyinfo'.
(x_create_tip_frame): Remove unused variable `tem'.
* src/w32inevt.c (w32_console_read_socket): Remove unused variable `no_events'.
* src/w32term.c (x_draw_composite_glyph_string_foreground):
Remove unused variable `width'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 33 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/fileio.c | 9 | ||||
| -rw-r--r-- | src/image.c | 1 | ||||
| -rw-r--r-- | src/keyboard.c | 1 | ||||
| -rw-r--r-- | src/unexw32.c | 1 | ||||
| -rw-r--r-- | src/w32.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 9 | ||||
| -rw-r--r-- | src/w32inevt.c | 1 | ||||
| -rw-r--r-- | src/w32term.c | 1 |
10 files changed, 40 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ae40e4638fa..3dfc86a4778 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2011-03-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef. | ||
| 4 | |||
| 5 | * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len' | ||
| 6 | and `suffix'. | ||
| 7 | (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration | ||
| 8 | of variables specific to SELinux and computation of `encoded_absname'. | ||
| 9 | |||
| 10 | * image.c (XPutPixel): Remove unused variable `height'. | ||
| 11 | |||
| 12 | * keyboard.c (make_lispy_event): Remove unused variable `hpos'. | ||
| 13 | |||
| 14 | * unexw32.c (get_section_info): Remove unused variable `section'. | ||
| 15 | |||
| 16 | * w32.c (stat): Remove unused variables `drive_root' and `devtype'. | ||
| 17 | (system_process_attributes): Remove unused variable `sess'. | ||
| 18 | (sys_read): Remove unused variable `err'. | ||
| 19 | |||
| 20 | * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef. | ||
| 21 | (w32_wnd_proc): Remove unused variable `isdead'. | ||
| 22 | (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef. | ||
| 23 | (Fx_server_max_request_size): Remove unused variable `dpyinfo'. | ||
| 24 | (x_create_tip_frame): Remove unused variable `tem'. | ||
| 25 | |||
| 26 | * w32inevt.c (w32_console_read_socket): | ||
| 27 | Remove unused variable `no_events'. | ||
| 28 | |||
| 29 | * w32term.c (x_draw_composite_glyph_string_foreground): | ||
| 30 | Remove unused variable `width'. | ||
| 31 | |||
| 1 | 2011-03-24 Juanma Barranquero <lekktu@gmail.com> | 32 | 2011-03-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 33 | ||
| 3 | * w32term.c (x_set_glyph_string_clipping): | 34 | * w32term.c (x_set_glyph_string_clipping): |
| @@ -40,7 +71,7 @@ | |||
| 40 | * buffer.c (Fkill_all_local_variables): | 71 | * buffer.c (Fkill_all_local_variables): |
| 41 | * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): | 72 | * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): |
| 42 | Use Frun_hooks. | 73 | Use Frun_hooks. |
| 43 | (command_loop_1): Use Frun_hooks. Call safe_run_hooks | 74 | (command_loop_1): Use Frun_hooks. Call safe_run_hooks |
| 44 | unconditionnaly since it does the check itself. | 75 | unconditionnaly since it does the check itself. |
| 45 | 76 | ||
| 46 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | 77 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> |
diff --git a/src/dispextern.h b/src/dispextern.h index 9843dfd1fcd..d1e0475dd15 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -662,7 +662,7 @@ struct glyph_matrix | |||
| 662 | line. */ | 662 | line. */ |
| 663 | unsigned header_line_p : 1; | 663 | unsigned header_line_p : 1; |
| 664 | 664 | ||
| 665 | #ifdef GLYPH_DEBUG | 665 | #if GLYPH_DEBUG |
| 666 | /* A string identifying the method used to display the matrix. */ | 666 | /* A string identifying the method used to display the matrix. */ |
| 667 | char method[512]; | 667 | char method[512]; |
| 668 | #endif | 668 | #endif |
diff --git a/src/fileio.c b/src/fileio.c index 64dda0a78e4..bab9360d3bc 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2359,8 +2359,6 @@ static int | |||
| 2359 | check_executable (char *filename) | 2359 | check_executable (char *filename) |
| 2360 | { | 2360 | { |
| 2361 | #ifdef DOS_NT | 2361 | #ifdef DOS_NT |
| 2362 | int len = strlen (filename); | ||
| 2363 | char *suffix; | ||
| 2364 | struct stat st; | 2362 | struct stat st; |
| 2365 | if (stat (filename, &st) < 0) | 2363 | if (stat (filename, &st) < 0) |
| 2366 | return 0; | 2364 | return 0; |
| @@ -2786,13 +2784,14 @@ as a list ("user", "role", "type", "range"). Has no effect if SELinux | |||
| 2786 | is disabled. */) | 2784 | is disabled. */) |
| 2787 | (Lisp_Object filename, Lisp_Object context) | 2785 | (Lisp_Object filename, Lisp_Object context) |
| 2788 | { | 2786 | { |
| 2789 | Lisp_Object absname, encoded_absname; | 2787 | Lisp_Object absname; |
| 2790 | Lisp_Object handler; | 2788 | Lisp_Object handler; |
| 2789 | #if HAVE_LIBSELINUX | ||
| 2790 | Lisp_Object encoded_absname; | ||
| 2791 | Lisp_Object user = CAR_SAFE (context); | 2791 | Lisp_Object user = CAR_SAFE (context); |
| 2792 | Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); | 2792 | Lisp_Object role = CAR_SAFE (CDR_SAFE (context)); |
| 2793 | Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); | 2793 | Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context))); |
| 2794 | Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); | 2794 | Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context)))); |
| 2795 | #if HAVE_LIBSELINUX | ||
| 2796 | security_context_t con; | 2795 | security_context_t con; |
| 2797 | int fail, conlength; | 2796 | int fail, conlength; |
| 2798 | context_t parsed_con; | 2797 | context_t parsed_con; |
| @@ -2806,9 +2805,9 @@ is disabled. */) | |||
| 2806 | if (!NILP (handler)) | 2805 | if (!NILP (handler)) |
| 2807 | return call3 (handler, Qset_file_selinux_context, absname, context); | 2806 | return call3 (handler, Qset_file_selinux_context, absname, context); |
| 2808 | 2807 | ||
| 2808 | #if HAVE_LIBSELINUX | ||
| 2809 | encoded_absname = ENCODE_FILE (absname); | 2809 | encoded_absname = ENCODE_FILE (absname); |
| 2810 | 2810 | ||
| 2811 | #if HAVE_LIBSELINUX | ||
| 2812 | if (is_selinux_enabled ()) | 2811 | if (is_selinux_enabled ()) |
| 2813 | { | 2812 | { |
| 2814 | /* Get current file context. */ | 2813 | /* Get current file context. */ |
diff --git a/src/image.c b/src/image.c index 7584f9bb2c0..04c6b1a2ad5 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4485,7 +4485,6 @@ static void | |||
| 4485 | XPutPixel (XImagePtr ximg, int x, int y, COLORREF color) | 4485 | XPutPixel (XImagePtr ximg, int x, int y, COLORREF color) |
| 4486 | { | 4486 | { |
| 4487 | int width = ximg->info.bmiHeader.biWidth; | 4487 | int width = ximg->info.bmiHeader.biWidth; |
| 4488 | int height = ximg->info.bmiHeader.biHeight; | ||
| 4489 | unsigned char * pixel; | 4488 | unsigned char * pixel; |
| 4490 | 4489 | ||
| 4491 | /* True color images. */ | 4490 | /* True color images. */ |
diff --git a/src/keyboard.c b/src/keyboard.c index 39848ee490d..6ce102c7d65 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -5399,7 +5399,6 @@ make_lispy_event (struct input_event *event) | |||
| 5399 | && (event->modifiers & down_modifier)) | 5399 | && (event->modifiers & down_modifier)) |
| 5400 | { | 5400 | { |
| 5401 | Lisp_Object items, item; | 5401 | Lisp_Object items, item; |
| 5402 | int hpos; | ||
| 5403 | int i; | 5402 | int i; |
| 5404 | 5403 | ||
| 5405 | /* Find the menu bar item under `column'. */ | 5404 | /* Find the menu bar item under `column'. */ |
diff --git a/src/unexw32.c b/src/unexw32.c index cd8211d6bee..e03fa6c9b9a 100644 --- a/src/unexw32.c +++ b/src/unexw32.c | |||
| @@ -341,7 +341,6 @@ get_section_info (file_data *p_infile) | |||
| 341 | { | 341 | { |
| 342 | PIMAGE_DOS_HEADER dos_header; | 342 | PIMAGE_DOS_HEADER dos_header; |
| 343 | PIMAGE_NT_HEADERS nt_header; | 343 | PIMAGE_NT_HEADERS nt_header; |
| 344 | PIMAGE_SECTION_HEADER section; | ||
| 345 | int overlap; | 344 | int overlap; |
| 346 | 345 | ||
| 347 | dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base; | 346 | dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base; |
| @@ -3250,8 +3250,6 @@ int | |||
| 3250 | stat (const char * path, struct stat * buf) | 3250 | stat (const char * path, struct stat * buf) |
| 3251 | { | 3251 | { |
| 3252 | char *name, *r; | 3252 | char *name, *r; |
| 3253 | char drive_root[4]; | ||
| 3254 | UINT devtype; | ||
| 3255 | WIN32_FIND_DATA wfd; | 3253 | WIN32_FIND_DATA wfd; |
| 3256 | HANDLE fh; | 3254 | HANDLE fh; |
| 3257 | unsigned __int64 fake_inode; | 3255 | unsigned __int64 fake_inode; |
| @@ -4043,7 +4041,6 @@ system_process_attributes (Lisp_Object pid) | |||
| 4043 | TOKEN_PRIMARY_GROUP group_token; | 4041 | TOKEN_PRIMARY_GROUP group_token; |
| 4044 | unsigned euid; | 4042 | unsigned euid; |
| 4045 | unsigned egid; | 4043 | unsigned egid; |
| 4046 | DWORD sess; | ||
| 4047 | PROCESS_MEMORY_COUNTERS mem; | 4044 | PROCESS_MEMORY_COUNTERS mem; |
| 4048 | PROCESS_MEMORY_COUNTERS_EX mem_ex; | 4045 | PROCESS_MEMORY_COUNTERS_EX mem_ex; |
| 4049 | DWORD minrss, maxrss; | 4046 | DWORD minrss, maxrss; |
| @@ -5408,7 +5405,6 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 5408 | { | 5405 | { |
| 5409 | HANDLE hnd = fd_info[fd].hnd; | 5406 | HANDLE hnd = fd_info[fd].hnd; |
| 5410 | OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read; | 5407 | OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read; |
| 5411 | DWORD err = 0; | ||
| 5412 | int rc = 0; | 5408 | int rc = 0; |
| 5413 | COMMTIMEOUTS ct; | 5409 | COMMTIMEOUTS ct; |
| 5414 | 5410 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index d833f9d550f..821cc671646 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -183,7 +183,7 @@ unsigned int msh_mousewheel = 0; | |||
| 183 | #define MENU_FREE_DELAY 1000 | 183 | #define MENU_FREE_DELAY 1000 |
| 184 | static unsigned menu_free_timer = 0; | 184 | static unsigned menu_free_timer = 0; |
| 185 | 185 | ||
| 186 | #ifdef GLYPH_DEBUG | 186 | #if GLYPH_DEBUG |
| 187 | int image_cache_refcount, dpyinfo_refcount; | 187 | int image_cache_refcount, dpyinfo_refcount; |
| 188 | #endif | 188 | #endif |
| 189 | 189 | ||
| @@ -2862,7 +2862,6 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 2862 | base character (ie. translating the base key plus | 2862 | base character (ie. translating the base key plus |
| 2863 | shift modifier). */ | 2863 | shift modifier). */ |
| 2864 | int add; | 2864 | int add; |
| 2865 | int isdead = 0; | ||
| 2866 | KEY_EVENT_RECORD key; | 2865 | KEY_EVENT_RECORD key; |
| 2867 | 2866 | ||
| 2868 | key.bKeyDown = TRUE; | 2867 | key.bKeyDown = TRUE; |
| @@ -3980,7 +3979,7 @@ unwind_create_frame (Lisp_Object frame) | |||
| 3980 | /* If frame is ``official'', nothing to do. */ | 3979 | /* If frame is ``official'', nothing to do. */ |
| 3981 | if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) | 3980 | if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) |
| 3982 | { | 3981 | { |
| 3983 | #ifdef GLYPH_DEBUG | 3982 | #if GLYPH_DEBUG |
| 3984 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 3983 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 3985 | #endif | 3984 | #endif |
| 3986 | 3985 | ||
| @@ -4521,8 +4520,6 @@ DISPLAY should be either a frame or a display name (a string). | |||
| 4521 | If omitted or nil, that stands for the selected frame's display. */) | 4520 | If omitted or nil, that stands for the selected frame's display. */) |
| 4522 | (Lisp_Object display) | 4521 | (Lisp_Object display) |
| 4523 | { | 4522 | { |
| 4524 | struct w32_display_info *dpyinfo = check_x_display_info (display); | ||
| 4525 | |||
| 4526 | return make_number (1); | 4523 | return make_number (1); |
| 4527 | } | 4524 | } |
| 4528 | 4525 | ||
| @@ -5171,7 +5168,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, | |||
| 5171 | Lisp_Object parms, Lisp_Object text) | 5168 | Lisp_Object parms, Lisp_Object text) |
| 5172 | { | 5169 | { |
| 5173 | struct frame *f; | 5170 | struct frame *f; |
| 5174 | Lisp_Object frame, tem; | 5171 | Lisp_Object frame; |
| 5175 | Lisp_Object name; | 5172 | Lisp_Object name; |
| 5176 | long window_prompting = 0; | 5173 | long window_prompting = 0; |
| 5177 | int width, height; | 5174 | int width, height; |
diff --git a/src/w32inevt.c b/src/w32inevt.c index c4858dea908..465f5ccb70f 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -677,7 +677,6 @@ w32_console_read_socket (struct terminal *terminal, | |||
| 677 | int expected, | 677 | int expected, |
| 678 | struct input_event *hold_quit) | 678 | struct input_event *hold_quit) |
| 679 | { | 679 | { |
| 680 | BOOL no_events = TRUE; | ||
| 681 | int nev, ret = 0, add; | 680 | int nev, ret = 0, add; |
| 682 | int isdead; | 681 | int isdead; |
| 683 | 682 | ||
diff --git a/src/w32term.c b/src/w32term.c index 2252c930711..f6a6ba3e82f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1289,7 +1289,6 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) | |||
| 1289 | else if (! s->first_glyph->u.cmp.automatic) | 1289 | else if (! s->first_glyph->u.cmp.automatic) |
| 1290 | { | 1290 | { |
| 1291 | int y = s->ybase; | 1291 | int y = s->ybase; |
| 1292 | int width = 0; | ||
| 1293 | HFONT old_font; | 1292 | HFONT old_font; |
| 1294 | 1293 | ||
| 1295 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); | 1294 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); |