Pacify clang -Wunused-variable
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Apr 2022 00:00:20 +0000 (17:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Apr 2022 00:33:16 +0000 (17:33 -0700)
* src/coding.c (detect_coding_utf_8):
* src/process.c (Finternal_default_process_filter):
Remove unused local vars.

src/coding.c
src/process.c

index c16598d275db84a5b224bcc1b2a8c244c9cd6cd3..2bed293d571b3974a144cc2ac8b3daf00bad1807 100644 (file)
@@ -1131,7 +1131,6 @@ detect_coding_utf_8 (struct coding_system *coding,
   ptrdiff_t consumed_chars = 0;
   bool bom_found = 0;
   ptrdiff_t nchars = coding->head_ascii;
-  int eol_seen = coding->eol_seen;
 
   detect_info->checked |= CATEGORY_MASK_UTF_8;
   /* A coding system of this category is always ASCII compatible.  */
@@ -1161,15 +1160,10 @@ detect_coding_utf_8 (struct coding_system *coding,
            {
              if (src < src_end && *src == '\n')
                {
-                 eol_seen |= EOL_SEEN_CRLF;
                  src++;
                  nchars++;
                }
-             else
-               eol_seen |= EOL_SEEN_CR;
            }
-         else if (c == '\n')
-           eol_seen |= EOL_SEEN_LF;
          continue;
        }
       ONE_MORE_BYTE (c1);
index d4a78521ab1bbeb97bdd5d6110e4d0cdceead7fc..08a02ad94232a6626bd8fba20767d65d2629e1eb 100644 (file)
@@ -6239,7 +6239,6 @@ Otherwise it discards the output.  */)
     {
       Lisp_Object old_read_only;
       ptrdiff_t old_begv, old_zv;
-      ptrdiff_t old_begv_byte, old_zv_byte;
       ptrdiff_t before, before_byte;
       ptrdiff_t opoint_byte;
       struct buffer *b;
@@ -6250,8 +6249,6 @@ Otherwise it discards the output.  */)
       old_read_only = BVAR (current_buffer, read_only);
       old_begv = BEGV;
       old_zv = ZV;
-      old_begv_byte = BEGV_BYTE;
-      old_zv_byte = ZV_BYTE;
 
       bset_read_only (current_buffer, Qnil);
 
@@ -6299,15 +6296,9 @@ Otherwise it discards the output.  */)
          opoint_byte += PT_BYTE - before_byte;
        }
       if (old_begv > before)
-       {
-         old_begv += PT - before;
-         old_begv_byte += PT_BYTE - before_byte;
-       }
+       old_begv += PT - before;
       if (old_zv >= before)
-       {
-         old_zv += PT - before;
-         old_zv_byte += PT_BYTE - before_byte;
-       }
+       old_zv += PT - before;
 
       /* If the restriction isn't what it should be, set it.  */
       if (old_begv != BEGV || old_zv != ZV)