diff options
| author | Juanma Barranquero | 2014-03-26 11:21:55 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-26 11:21:55 +0100 |
| commit | 5af73b0fe8975eeb47fb270819b4143c18d71caa (patch) | |
| tree | 94bd8d6b4a3737b0994bd3b9bfd41796af7247a0 /src | |
| parent | c1e6bc0a37980cdedb8bc0454f2b21008fbee0f7 (diff) | |
| download | emacs-5af73b0fe8975eeb47fb270819b4143c18d71caa.tar.gz emacs-5af73b0fe8975eeb47fb270819b4143c18d71caa.zip | |
src/*.c: Silence a few warnings about unused vars and functions.
* src/image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
* src/sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
* src/keyboard.c (read_decoded_event_from_main_queue): #ifdef out
variables on Windows.
* src/w32.c (unsetenv): Remove unused var `retval'.
(emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
* src/w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
* src/w32notify.c (watch_worker): Remove unnecesary var sleep_result.
(start_watching): Remove unused var `thr'.
* src/w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
(find_child_console): Remove unnecesary var `thread_id'.
* src/w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
(x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 22 | ||||
| -rw-r--r-- | src/image.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/sysdep.c | 2 | ||||
| -rw-r--r-- | src/w32.c | 3 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/w32notify.c | 4 | ||||
| -rw-r--r-- | src/w32proc.c | 11 | ||||
| -rw-r--r-- | src/w32term.c | 6 |
9 files changed, 40 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 05c5b42ef90..84cd041c36c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2014-03-26 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]: | ||
| 4 | * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally. | ||
| 5 | |||
| 6 | * keyboard.c (read_decoded_event_from_main_queue): #ifdef out | ||
| 7 | variables on Windows. | ||
| 8 | |||
| 9 | * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression. | ||
| 10 | |||
| 11 | * w32.c (unsetenv): Remove unused var `retval'. | ||
| 12 | (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'. | ||
| 13 | |||
| 14 | * w32notify.c (watch_worker): Remove unnecesary var sleep_result. | ||
| 15 | (start_watching): Remove unused var `thr'. | ||
| 16 | |||
| 17 | * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'. | ||
| 18 | (find_child_console): Remove unnecesary var `thread_id'. | ||
| 19 | |||
| 20 | * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'. | ||
| 21 | (x_focus_frame): #ifdef 0 unused variable `dpyinfo'. | ||
| 22 | |||
| 1 | 2014-03-26 Glenn Morris <rgm@gnu.org> | 23 | 2014-03-26 Glenn Morris <rgm@gnu.org> |
| 2 | 24 | ||
| 3 | * filelock.c (Flock_buffer): Doc tweak. | 25 | * filelock.c (Flock_buffer): Doc tweak. |
diff --git a/src/image.c b/src/image.c index d6d5ace509d..6b33e1de8a1 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -160,6 +160,7 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) | |||
| 160 | 160 | ||
| 161 | /* Functions to access the contents of a bitmap, given an id. */ | 161 | /* Functions to access the contents of a bitmap, given an id. */ |
| 162 | 162 | ||
| 163 | #ifdef HAVE_X_WINDOWS | ||
| 163 | static int | 164 | static int |
| 164 | x_bitmap_height (struct frame *f, ptrdiff_t id) | 165 | x_bitmap_height (struct frame *f, ptrdiff_t id) |
| 165 | { | 166 | { |
| @@ -171,6 +172,7 @@ x_bitmap_width (struct frame *f, ptrdiff_t id) | |||
| 171 | { | 172 | { |
| 172 | return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; | 173 | return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; |
| 173 | } | 174 | } |
| 175 | #endif | ||
| 174 | 176 | ||
| 175 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) | 177 | #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) |
| 176 | ptrdiff_t | 178 | ptrdiff_t |
diff --git a/src/keyboard.c b/src/keyboard.c index 2b3de6e27c2..439a40f8762 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2299,8 +2299,10 @@ read_decoded_event_from_main_queue (struct timespec *end_time, | |||
| 2299 | bool *used_mouse_menu) | 2299 | bool *used_mouse_menu) |
| 2300 | { | 2300 | { |
| 2301 | #define MAX_ENCODED_BYTES 16 | 2301 | #define MAX_ENCODED_BYTES 16 |
| 2302 | #ifndef WINDOWSNT | ||
| 2302 | Lisp_Object events[MAX_ENCODED_BYTES]; | 2303 | Lisp_Object events[MAX_ENCODED_BYTES]; |
| 2303 | int n = 0; | 2304 | int n = 0; |
| 2305 | #endif | ||
| 2304 | while (true) | 2306 | while (true) |
| 2305 | { | 2307 | { |
| 2306 | Lisp_Object nextevt | 2308 | Lisp_Object nextevt |
diff --git a/src/sysdep.c b/src/sysdep.c index af9f4801cec..b33900062ae 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -603,6 +603,7 @@ init_sigio (int fd) | |||
| 603 | #endif | 603 | #endif |
| 604 | } | 604 | } |
| 605 | 605 | ||
| 606 | #ifndef DOS_NT | ||
| 606 | static void | 607 | static void |
| 607 | reset_sigio (int fd) | 608 | reset_sigio (int fd) |
| 608 | { | 609 | { |
| @@ -610,6 +611,7 @@ reset_sigio (int fd) | |||
| 610 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); | 611 | fcntl (fd, F_SETFL, old_fcntl_flags[fd]); |
| 611 | #endif | 612 | #endif |
| 612 | } | 613 | } |
| 614 | #endif | ||
| 613 | 615 | ||
| 614 | void | 616 | void |
| 615 | request_sigio (void) | 617 | request_sigio (void) |
| @@ -2413,7 +2413,6 @@ unsetenv (const char *name) | |||
| 2413 | { | 2413 | { |
| 2414 | char *var; | 2414 | char *var; |
| 2415 | size_t name_len; | 2415 | size_t name_len; |
| 2416 | int retval; | ||
| 2417 | 2416 | ||
| 2418 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) | 2417 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) |
| 2419 | { | 2418 | { |
| @@ -9261,8 +9260,6 @@ ssize_t | |||
| 9261 | emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz) | 9260 | emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz) |
| 9262 | { | 9261 | { |
| 9263 | int n, err; | 9262 | int n, err; |
| 9264 | SELECT_TYPE fdset; | ||
| 9265 | struct timespec timeout; | ||
| 9266 | struct Lisp_Process *process = (struct Lisp_Process *)p; | 9263 | struct Lisp_Process *process = (struct Lisp_Process *)p; |
| 9267 | int fd = process->infd; | 9264 | int fd = process->infd; |
| 9268 | 9265 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 9dab1408b49..080771f4cca 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7528,8 +7528,8 @@ If the underlying system call fails, value is nil. */) | |||
| 7528 | (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) | 7528 | (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) |
| 7529 | = GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); | 7529 | = GetProcAddress (hKernel, "GetDiskFreeSpaceExA"); |
| 7530 | bool have_pfn_GetDiskFreeSpaceEx = | 7530 | bool have_pfn_GetDiskFreeSpaceEx = |
| 7531 | (w32_unicode_filenames && pfn_GetDiskFreeSpaceExW | 7531 | ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW) |
| 7532 | || !w32_unicode_filenames && pfn_GetDiskFreeSpaceExA); | 7532 | || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA)); |
| 7533 | 7533 | ||
| 7534 | /* On Windows, we may need to specify the root directory of the | 7534 | /* On Windows, we may need to specify the root directory of the |
| 7535 | volume holding FILENAME. */ | 7535 | volume holding FILENAME. */ |
diff --git a/src/w32notify.c b/src/w32notify.c index 7155f16f3b0..86412b8a974 100644 --- a/src/w32notify.c +++ b/src/w32notify.c | |||
| @@ -247,7 +247,6 @@ watch_worker (LPVOID arg) | |||
| 247 | 247 | ||
| 248 | do { | 248 | do { |
| 249 | BOOL status; | 249 | BOOL status; |
| 250 | DWORD sleep_result; | ||
| 251 | DWORD bytes_ret = 0; | 250 | DWORD bytes_ret = 0; |
| 252 | 251 | ||
| 253 | if (dirwatch->dir) | 252 | if (dirwatch->dir) |
| @@ -275,7 +274,7 @@ watch_worker (LPVOID arg) | |||
| 275 | /* Sleep indefinitely until awoken by the I/O completion, which | 274 | /* Sleep indefinitely until awoken by the I/O completion, which |
| 276 | could be either a change notification or a cancellation of the | 275 | could be either a change notification or a cancellation of the |
| 277 | watch. */ | 276 | watch. */ |
| 278 | sleep_result = SleepEx (INFINITE, TRUE); | 277 | SleepEx (INFINITE, TRUE); |
| 279 | } while (!dirwatch->terminate); | 278 | } while (!dirwatch->terminate); |
| 280 | 279 | ||
| 281 | return 0; | 280 | return 0; |
| @@ -287,7 +286,6 @@ static struct notification * | |||
| 287 | start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags) | 286 | start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags) |
| 288 | { | 287 | { |
| 289 | struct notification *dirwatch = xzalloc (sizeof (struct notification)); | 288 | struct notification *dirwatch = xzalloc (sizeof (struct notification)); |
| 290 | HANDLE thr; | ||
| 291 | 289 | ||
| 292 | dirwatch->signature = DIRWATCH_SIGNATURE; | 290 | dirwatch->signature = DIRWATCH_SIGNATURE; |
| 293 | dirwatch->buf = xmalloc (16384); | 291 | dirwatch->buf = xmalloc (16384); |
diff --git a/src/w32proc.c b/src/w32proc.c index 96f11657892..426a656f566 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -1772,12 +1772,12 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 1772 | if (need_quotes) | 1772 | if (need_quotes) |
| 1773 | { | 1773 | { |
| 1774 | int escape_char_run = 0; | 1774 | int escape_char_run = 0; |
| 1775 | char * first; | 1775 | /* char * first; */ |
| 1776 | char * last; | 1776 | /* char * last; */ |
| 1777 | 1777 | ||
| 1778 | p = *targ; | 1778 | p = *targ; |
| 1779 | first = p; | 1779 | /* first = p; */ |
| 1780 | last = p + strlen (p) - 1; | 1780 | /* last = p + strlen (p) - 1; */ |
| 1781 | *parg++ = '"'; | 1781 | *parg++ = '"'; |
| 1782 | #if 0 | 1782 | #if 0 |
| 1783 | /* This version does not escape quotes if they occur at the | 1783 | /* This version does not escape quotes if they occur at the |
| @@ -2249,10 +2249,9 @@ static BOOL CALLBACK | |||
| 2249 | find_child_console (HWND hwnd, LPARAM arg) | 2249 | find_child_console (HWND hwnd, LPARAM arg) |
| 2250 | { | 2250 | { |
| 2251 | child_process * cp = (child_process *) arg; | 2251 | child_process * cp = (child_process *) arg; |
| 2252 | DWORD thread_id; | ||
| 2253 | DWORD process_id; | 2252 | DWORD process_id; |
| 2254 | 2253 | ||
| 2255 | thread_id = GetWindowThreadProcessId (hwnd, &process_id); | 2254 | GetWindowThreadProcessId (hwnd, &process_id); |
| 2256 | if (process_id == cp->procinfo.dwProcessId) | 2255 | if (process_id == cp->procinfo.dwProcessId) |
| 2257 | { | 2256 | { |
| 2258 | char window_class[32]; | 2257 | char window_class[32]; |
diff --git a/src/w32term.c b/src/w32term.c index 15b502b7c1b..52eccc27e81 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -4752,8 +4752,8 @@ w32_read_socket (struct terminal *terminal, | |||
| 4752 | width = rect.right - rect.left; | 4752 | width = rect.right - rect.left; |
| 4753 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, width); | 4753 | text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, width); |
| 4754 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, height); | 4754 | text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, height); |
| 4755 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height); | 4755 | /* rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height); */ |
| 4756 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width); | 4756 | /* columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width); */ |
| 4757 | 4757 | ||
| 4758 | /* TODO: Clip size to the screen dimensions. */ | 4758 | /* TODO: Clip size to the screen dimensions. */ |
| 4759 | 4759 | ||
| @@ -5794,7 +5794,9 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) | |||
| 5794 | void | 5794 | void |
| 5795 | x_focus_frame (struct frame *f) | 5795 | x_focus_frame (struct frame *f) |
| 5796 | { | 5796 | { |
| 5797 | #if 0 | ||
| 5797 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 5798 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 5799 | #endif | ||
| 5798 | 5800 | ||
| 5799 | /* Give input focus to frame. */ | 5801 | /* Give input focus to frame. */ |
| 5800 | block_input (); | 5802 | block_input (); |