From 1418e40793931bb7c3212aaadc26c4fa4552a396 Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <lfleischer@calcurse.org>
Date: Thu, 10 May 2018 14:05:04 +0200
Subject: Use dummy variables to ignore return values of pair_content()

This prevents from segmentation faults with recent ncurses
implementations. See commit 5722d2e (Fix segmentation fault when
changing colors, 2017-07-28) for details.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
---
 src/custom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/custom.c b/src/custom.c
index a7ded71..4005dc3 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -58,8 +58,8 @@ static struct attribute attr;
  */
 void custom_init_attr(void)
 {
-	short col_fg;
-	pair_content(COLR_CUSTOM, &col_fg, NULL);
+	short col_fg, dummy;
+	pair_content(COLR_CUSTOM, &col_fg, &dummy);
 
 	attr.color[ATTR_HIGHEST] =
 		(col_fg == -1 || col_fg == 255) ?
-- 
cgit v1.2.3-70-g09d2