]> code.delx.au - gnu-emacs/commitdiff
nt/*.c, src/*.c: Remove unused variables.
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 25 Mar 2011 15:39:59 +0000 (16:39 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 25 Mar 2011 15:39:59 +0000 (16:39 +0100)
* 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'.

13 files changed:
nt/ChangeLog
nt/addpm.c
nt/preprep.c
src/ChangeLog
src/dispextern.h
src/fileio.c
src/image.c
src/keyboard.c
src/unexw32.c
src/w32.c
src/w32fns.c
src/w32inevt.c
src/w32term.c

index 657b4c7a10fb3092fd627f7d51b017ed06b8e89b..f041bac73607312f399ea15a0ed1606207129bac 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       * addpm.c (main): Remove unused variable `retval'.
+
+       * preprep.c (main): Remove unused variable `ptr'.
+
 2011-03-23  Juanma Barranquero  <lekktu@gmail.com>
 
        * cmdproxy.c: Include <ctype.h>.
index c2cd1a07abc2ca976645d0a78d8b1f9923a27f97..d7919d36f80f4cf7f068f9f1a421ef32c88fa103 100644 (file)
@@ -274,8 +274,6 @@ main (int argc, char *argv[])
     {
       if (strlen (start_folder) < (MAX_PATH - 20))
        {
-         BOOL retval;
-
          strcat (start_folder, "\\Gnu Emacs");
          if (CreateDirectory (start_folder, NULL)
              || GetLastError () == ERROR_ALREADY_EXISTS)
@@ -307,8 +305,6 @@ main (int argc, char *argv[])
       /* Ensure there is enough room for "...\GNU Emacs\Emacs.lnk".  */
       if (strlen (start_folder) < (MAX_PATH - 20))
        {
-         BOOL retval;
-
          strcat (start_folder, "\\Gnu Emacs");
          if (CreateDirectory (start_folder, NULL)
              || GetLastError () == ERROR_ALREADY_EXISTS)
index 513ad14e966a8af30e3cae9095f61b6382defba6..6b764afdeab4cd6490f80803e2a5d070e8749cd0 100644 (file)
@@ -765,7 +765,6 @@ main (int argc, char **argv)
   PIMAGE_NT_HEADERS nt_header;
   file_data in_file, out_file;
   char out_filename[MAX_PATH], in_filename[MAX_PATH];
-  const char *ptr;
 
   strcpy (in_filename, argv[1]);
   strcpy (out_filename, argv[2]);
index ae40e4638fab41f0c47ac6d44953ef9d3223fb50..3dfc86a47788a5f86638abf36d81bcebaebc54e9 100644 (file)
@@ -1,3 +1,34 @@
+2011-03-25  Juanma Barranquero  <lekktu@gmail.com>
+
+       * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
+
+       * 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'.
+
+       * image.c (XPutPixel): Remove unused variable `height'.
+
+       * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
+
+       * unexw32.c (get_section_info): Remove unused variable `section'.
+
+       * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
+       (system_process_attributes): Remove unused variable `sess'.
+       (sys_read): Remove unused variable `err'.
+
+       * 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'.
+
+       * w32inevt.c (w32_console_read_socket):
+       Remove unused variable `no_events'.
+
+       * w32term.c (x_draw_composite_glyph_string_foreground):
+       Remove unused variable `width'.
+
 2011-03-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * w32term.c (x_set_glyph_string_clipping):
@@ -40,7 +71,7 @@
        * buffer.c (Fkill_all_local_variables):
        * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
        Use Frun_hooks.
-       (command_loop_1): Use Frun_hooks. Call safe_run_hooks
+       (command_loop_1): Use Frun_hooks.  Call safe_run_hooks
        unconditionnaly since it does the check itself.
 
 2011-03-23  Paul Eggert  <eggert@cs.ucla.edu>
index 9843dfd1fcd67e2bfcb19c142cf0b61208351b35..d1e0475dd1502e9d14365c8617ac543f342869f8 100644 (file)
@@ -662,7 +662,7 @@ struct glyph_matrix
      line.  */
   unsigned header_line_p : 1;
 
-#ifdef GLYPH_DEBUG
+#if GLYPH_DEBUG
   /* A string identifying the method used to display the matrix.  */
   char method[512];
 #endif
index 64dda0a78e433b5a70644b09090d8b83d8e80fc1..bab9360d3bcd6b1c05a8ac92d1f89a63a046ff6e 100644 (file)
@@ -2359,8 +2359,6 @@ static int
 check_executable (char *filename)
 {
 #ifdef DOS_NT
-  int len = strlen (filename);
-  char *suffix;
   struct stat st;
   if (stat (filename, &st) < 0)
     return 0;
@@ -2786,13 +2784,14 @@ as a list ("user", "role", "type", "range"). Has no effect if SELinux
 is disabled. */)
   (Lisp_Object filename, Lisp_Object context)
 {
-  Lisp_Object absname, encoded_absname;
+  Lisp_Object absname;
   Lisp_Object handler;
+#if HAVE_LIBSELINUX
+  Lisp_Object encoded_absname;
   Lisp_Object user = CAR_SAFE (context);
   Lisp_Object role = CAR_SAFE (CDR_SAFE (context));
   Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context)));
   Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context))));
-#if HAVE_LIBSELINUX
   security_context_t con;
   int fail, conlength;
   context_t parsed_con;
@@ -2806,9 +2805,9 @@ is disabled. */)
   if (!NILP (handler))
     return call3 (handler, Qset_file_selinux_context, absname, context);
 
+#if HAVE_LIBSELINUX
   encoded_absname = ENCODE_FILE (absname);
 
-#if HAVE_LIBSELINUX
   if (is_selinux_enabled ())
     {
       /* Get current file context. */
index 7584f9bb2c0c4f9a90a8702676b7e7e56e941833..04c6b1a2ad59d0943fdd371761f3eefc83a1f1ba 100644 (file)
@@ -4485,7 +4485,6 @@ static void
 XPutPixel (XImagePtr ximg, int x, int y, COLORREF color)
 {
   int width = ximg->info.bmiHeader.biWidth;
-  int height = ximg->info.bmiHeader.biHeight;
   unsigned char * pixel;
 
   /* True color images.  */
index 39848ee490dbb5a20ce340e741cab7256c894db2..6ce102c7d65f1a4fdf74e92bceb5387149246cd8 100644 (file)
@@ -5399,7 +5399,6 @@ make_lispy_event (struct input_event *event)
                && (event->modifiers & down_modifier))
              {
                Lisp_Object items, item;
-               int hpos;
                int i;
 
                /* Find the menu bar item under `column'.  */
index cd8211d6bee5828d0952ee525cfe2a10e668275c..e03fa6c9b9a79118d051d00af31db7e7da7f13c3 100644 (file)
@@ -341,7 +341,6 @@ get_section_info (file_data *p_infile)
 {
   PIMAGE_DOS_HEADER dos_header;
   PIMAGE_NT_HEADERS nt_header;
-  PIMAGE_SECTION_HEADER section;
   int overlap;
 
   dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
index 721cea07d2051e2c24b68fa871f982143b39ccf8..bbf777b2e1de8bf4e2eaace0ec95d7178b6ae394 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -3250,8 +3250,6 @@ int
 stat (const char * path, struct stat * buf)
 {
   char *name, *r;
-  char drive_root[4];
-  UINT devtype;
   WIN32_FIND_DATA wfd;
   HANDLE fh;
   unsigned __int64 fake_inode;
@@ -4043,7 +4041,6 @@ system_process_attributes (Lisp_Object pid)
   TOKEN_PRIMARY_GROUP group_token;
   unsigned euid;
   unsigned egid;
-  DWORD sess;
   PROCESS_MEMORY_COUNTERS mem;
   PROCESS_MEMORY_COUNTERS_EX mem_ex;
   DWORD minrss, maxrss;
@@ -5408,7 +5405,6 @@ sys_read (int fd, char * buffer, unsigned int count)
            {
              HANDLE hnd = fd_info[fd].hnd;
              OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read;
-             DWORD err = 0;
              int rc = 0;
              COMMTIMEOUTS ct;
 
index d833f9d550f0a72d92f9997c046a9f56431aea6b..821cc671646b9e01c039d68e90b7e92f2913fa7e 100644 (file)
@@ -183,7 +183,7 @@ unsigned int msh_mousewheel = 0;
 #define MENU_FREE_DELAY 1000
 static unsigned menu_free_timer = 0;
 
-#ifdef GLYPH_DEBUG
+#if GLYPH_DEBUG
 int image_cache_refcount, dpyinfo_refcount;
 #endif
 
@@ -2862,7 +2862,6 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                         base character (ie. translating the base key plus
                         shift modifier).  */
                      int add;
-                     int isdead = 0;
                      KEY_EVENT_RECORD key;
 
                      key.bKeyDown = TRUE;
@@ -3980,7 +3979,7 @@ unwind_create_frame (Lisp_Object frame)
   /* If frame is ``official'', nothing to do.  */
   if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame))
     {
-#ifdef GLYPH_DEBUG
+#if GLYPH_DEBUG
       struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
 #endif
 
@@ -4521,8 +4520,6 @@ DISPLAY should be either a frame or a display name (a string).
 If omitted or nil, that stands for the selected frame's display.  */)
   (Lisp_Object display)
 {
-  struct w32_display_info *dpyinfo = check_x_display_info (display);
-
   return make_number (1);
 }
 
@@ -5171,7 +5168,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
                    Lisp_Object parms, Lisp_Object text)
 {
   struct frame *f;
-  Lisp_Object frame, tem;
+  Lisp_Object frame;
   Lisp_Object name;
   long window_prompting = 0;
   int width, height;
index c4858dea9083b5c5632354e4f9676c89d87e6c27..465f5ccb70fc04a57676d38baba22dfc08ef8f4a 100644 (file)
@@ -677,7 +677,6 @@ w32_console_read_socket (struct terminal *terminal,
                          int expected,
                          struct input_event *hold_quit)
 {
-  BOOL no_events = TRUE;
   int nev, ret = 0, add;
   int isdead;
 
index 2252c930711b46edb74401e89276de234d2f3205..f6a6ba3e82f98bd3ab8ecdd0f1edcea4baf520fb 100644 (file)
@@ -1289,7 +1289,6 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s)
   else if (! s->first_glyph->u.cmp.automatic)
     {
       int y = s->ybase;
-      int width = 0;
       HFONT old_font;
 
       old_font = SelectObject (s->hdc, FONT_HANDLE (font));