summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-04-08 17:00:20 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-04-08 17:33:16 -0700
commit68bc1446855c86b96d5bc22f819e63358ab250ac (patch)
treeeef98760d333963f8d62109280ec59784aa02441
parentd9bffa1f3b121085fd8f954eb9446a4a5241c062 (diff)
downloademacs-68bc1446855c86b96d5bc22f819e63358ab250ac.tar.gz
Pacify clang -Wunused-variable
* src/coding.c (detect_coding_utf_8): * src/process.c (Finternal_default_process_filter): Remove unused local vars.
-rw-r--r--src/coding.c6
-rw-r--r--src/process.c13
2 files changed, 2 insertions, 17 deletions
diff --git a/src/coding.c b/src/coding.c
index c16598d275d..2bed293d571 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 d4a78521ab1..08a02ad9423 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)