Cast 'term' to (non-const) char* when passing to setupterm() because terminfo's prototypes don't use const

This commit is contained in:
Paul LeoNerd Evans 2008-11-28 19:48:41 +00:00
parent fef558eeb4
commit d245285df2

View File

@ -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);