From d245285df2bbe20ff2e78020acc3667eac1e7868 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Fri, 28 Nov 2008 19:48:41 +0000 Subject: Cast 'term' to (non-const) char* when passing to setupterm() because terminfo's prototypes don't use const --- driver-ti.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver-ti.c b/driver-ti.c index 727cb78..952bf76 100644 --- a/driver-ti.c +++ b/driver-ti.c @@ -148,7 +148,9 @@ static void *new_driver(termkey_t *tk, const char *term) { int err; - if(setupterm(term, 1, &err) != OK) + /* Have to cast away the const. But it's OK - we know terminfo won't really + * modify term */ + if(setupterm((char*)term, 1, &err) != OK) return NULL; termkey_ti *ti = malloc(sizeof *ti); -- cgit v1.2.3-70-g09d2