emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 68bc144685 2/3: Pacify clang -Wunused-variable


From: Paul Eggert
Subject: master 68bc144685 2/3: Pacify clang -Wunused-variable
Date: Fri, 8 Apr 2022 20:33:26 -0400 (EDT)

branch: master
commit 68bc1446855c86b96d5bc22f819e63358ab250ac
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Pacify clang -Wunused-variable
    
    * src/coding.c (detect_coding_utf_8):
    * src/process.c (Finternal_default_process_filter):
    Remove unused local vars.
---
 src/coding.c  |  6 ------
 src/process.c | 13 ++-----------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/coding.c b/src/coding.c
index c16598d275..2bed293d57 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -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);
diff --git a/src/process.c b/src/process.c
index d4a78521ab..08a02ad942 100644
--- a/src/process.c
+++ b/src/process.c
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]