summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-01-17 00:34:35 +0000
committerColin Watson <cjwatson@debian.org>2022-01-17 00:34:35 +0000
commit83b0600bd452740e357ddd925a4927b96dd9ce5a (patch)
tree10806a8f86e33459bd81c8e5df6874c419cf89c2 /lib
parentb7e6ca7decc86e0780f20a681cbf3403139a90f5 (diff)
Pacify cppcheck in check_preprocessor_encoding
* lib/encoding.c (check_preprocessor_encoding): Explicitly initialize directive_end and ppsearch. If directive is non-NULL by the time these are used then they're always initialized, but cppcheck didn't manage to spot that.
Diffstat (limited to 'lib')
-rw-r--r--lib/encodings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/encodings.c b/lib/encodings.c
index c1ed8067..c3373ac2 100644
--- a/lib/encodings.c
+++ b/lib/encodings.c
@@ -874,7 +874,7 @@ char *check_preprocessor_encoding (pipeline *p, const char *to_encoding,
{
char *pp_encoding = NULL;
const char *line = pipeline_peekline (p);
- const char *directive = NULL, *directive_end, *pp_search;
+ const char *directive = NULL, *directive_end = NULL, *pp_search = NULL;
size_t pp_encoding_len = 0;
/* Some people use .\" incorrectly. We allow it for encoding