mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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'.
This commit is contained in:
parent
c1e6bc0a37
commit
5af73b0fe8
9 changed files with 40 additions and 16 deletions
|
|
@ -1,3 +1,25 @@
|
|||
2014-03-26 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
|
||||
* sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
|
||||
|
||||
* keyboard.c (read_decoded_event_from_main_queue): #ifdef out
|
||||
variables on Windows.
|
||||
|
||||
* w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
|
||||
|
||||
* w32.c (unsetenv): Remove unused var `retval'.
|
||||
(emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
|
||||
|
||||
* w32notify.c (watch_worker): Remove unnecesary var sleep_result.
|
||||
(start_watching): Remove unused var `thr'.
|
||||
|
||||
* w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
|
||||
(find_child_console): Remove unnecesary var `thread_id'.
|
||||
|
||||
* w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
|
||||
(x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
|
||||
|
||||
2014-03-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* filelock.c (Flock_buffer): Doc tweak.
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
|
|||
|
||||
/* Functions to access the contents of a bitmap, given an id. */
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
static int
|
||||
x_bitmap_height (struct frame *f, ptrdiff_t id)
|
||||
{
|
||||
|
|
@ -171,6 +172,7 @@ x_bitmap_width (struct frame *f, ptrdiff_t id)
|
|||
{
|
||||
return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
|
||||
ptrdiff_t
|
||||
|
|
|
|||
|
|
@ -2299,8 +2299,10 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
|
|||
bool *used_mouse_menu)
|
||||
{
|
||||
#define MAX_ENCODED_BYTES 16
|
||||
#ifndef WINDOWSNT
|
||||
Lisp_Object events[MAX_ENCODED_BYTES];
|
||||
int n = 0;
|
||||
#endif
|
||||
while (true)
|
||||
{
|
||||
Lisp_Object nextevt
|
||||
|
|
|
|||
|
|
@ -603,6 +603,7 @@ init_sigio (int fd)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef DOS_NT
|
||||
static void
|
||||
reset_sigio (int fd)
|
||||
{
|
||||
|
|
@ -610,6 +611,7 @@ reset_sigio (int fd)
|
|||
fcntl (fd, F_SETFL, old_fcntl_flags[fd]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
request_sigio (void)
|
||||
|
|
|
|||
|
|
@ -2413,7 +2413,6 @@ unsetenv (const char *name)
|
|||
{
|
||||
char *var;
|
||||
size_t name_len;
|
||||
int retval;
|
||||
|
||||
if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
|
||||
{
|
||||
|
|
@ -9261,8 +9260,6 @@ ssize_t
|
|||
emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
|
||||
{
|
||||
int n, err;
|
||||
SELECT_TYPE fdset;
|
||||
struct timespec timeout;
|
||||
struct Lisp_Process *process = (struct Lisp_Process *)p;
|
||||
int fd = process->infd;
|
||||
|
||||
|
|
|
|||
|
|
@ -7528,8 +7528,8 @@ If the underlying system call fails, value is nil. */)
|
|||
(char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)
|
||||
= GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
|
||||
bool have_pfn_GetDiskFreeSpaceEx =
|
||||
(w32_unicode_filenames && pfn_GetDiskFreeSpaceExW
|
||||
|| !w32_unicode_filenames && pfn_GetDiskFreeSpaceExA);
|
||||
((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW)
|
||||
|| (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA));
|
||||
|
||||
/* On Windows, we may need to specify the root directory of the
|
||||
volume holding FILENAME. */
|
||||
|
|
|
|||
|
|
@ -247,7 +247,6 @@ watch_worker (LPVOID arg)
|
|||
|
||||
do {
|
||||
BOOL status;
|
||||
DWORD sleep_result;
|
||||
DWORD bytes_ret = 0;
|
||||
|
||||
if (dirwatch->dir)
|
||||
|
|
@ -275,7 +274,7 @@ watch_worker (LPVOID arg)
|
|||
/* Sleep indefinitely until awoken by the I/O completion, which
|
||||
could be either a change notification or a cancellation of the
|
||||
watch. */
|
||||
sleep_result = SleepEx (INFINITE, TRUE);
|
||||
SleepEx (INFINITE, TRUE);
|
||||
} while (!dirwatch->terminate);
|
||||
|
||||
return 0;
|
||||
|
|
@ -287,7 +286,6 @@ static struct notification *
|
|||
start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags)
|
||||
{
|
||||
struct notification *dirwatch = xzalloc (sizeof (struct notification));
|
||||
HANDLE thr;
|
||||
|
||||
dirwatch->signature = DIRWATCH_SIGNATURE;
|
||||
dirwatch->buf = xmalloc (16384);
|
||||
|
|
|
|||
|
|
@ -1772,12 +1772,12 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
|
|||
if (need_quotes)
|
||||
{
|
||||
int escape_char_run = 0;
|
||||
char * first;
|
||||
char * last;
|
||||
/* char * first; */
|
||||
/* char * last; */
|
||||
|
||||
p = *targ;
|
||||
first = p;
|
||||
last = p + strlen (p) - 1;
|
||||
/* first = p; */
|
||||
/* last = p + strlen (p) - 1; */
|
||||
*parg++ = '"';
|
||||
#if 0
|
||||
/* This version does not escape quotes if they occur at the
|
||||
|
|
@ -2249,10 +2249,9 @@ static BOOL CALLBACK
|
|||
find_child_console (HWND hwnd, LPARAM arg)
|
||||
{
|
||||
child_process * cp = (child_process *) arg;
|
||||
DWORD thread_id;
|
||||
DWORD process_id;
|
||||
|
||||
thread_id = GetWindowThreadProcessId (hwnd, &process_id);
|
||||
GetWindowThreadProcessId (hwnd, &process_id);
|
||||
if (process_id == cp->procinfo.dwProcessId)
|
||||
{
|
||||
char window_class[32];
|
||||
|
|
|
|||
|
|
@ -4752,8 +4752,8 @@ w32_read_socket (struct terminal *terminal,
|
|||
width = rect.right - rect.left;
|
||||
text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, width);
|
||||
text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, height);
|
||||
rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height);
|
||||
columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width);
|
||||
/* rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height); */
|
||||
/* columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width); */
|
||||
|
||||
/* TODO: Clip size to the screen dimensions. */
|
||||
|
||||
|
|
@ -5794,7 +5794,9 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
|
|||
void
|
||||
x_focus_frame (struct frame *f)
|
||||
{
|
||||
#if 0
|
||||
struct w32_display_info *dpyinfo = &one_w32_display_info;
|
||||
#endif
|
||||
|
||||
/* Give input focus to frame. */
|
||||
block_input ();
|
||||
|
|
|
|||
Loading…
Reference in a new issue