From 1e5614b31b0668d762b9986a3a0e0192f2703337 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 22 Jul 2016 15:48:06 +0200 Subject: [PATCH] tweaks: avoid two compiler warnings --- src/color.c | 2 +- src/rcfile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/color.c b/src/color.c index a351059d..98d83e51 100644 --- a/src/color.c +++ b/src/color.c @@ -343,7 +343,7 @@ void reset_multis_for_id(filestruct *fileptr, int index) void reset_multis(filestruct *fileptr, bool force) { const colortype *ink; - int nobegin, noend; + int nobegin = 0, noend = 0; regmatch_t startmatch, endmatch; /* If there is no syntax or no multiline regex, there is nothing to do. */ diff --git a/src/rcfile.c b/src/rcfile.c index c9f6b538..c46c361a 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -658,7 +658,7 @@ void parse_colors(char *ptr, int rex_flags) /* Now for the fun part. Start adding regexes to individual strings * in the colorstrings array, woo! */ while (ptr != NULL && *ptr != '\0') { - colortype *newcolor; + colortype *newcolor = NULL; /* The container for a color plus its regexes. */ bool goodstart; /* Whether the start expression was valid. */