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
1 changed files with 3 additions and 1 deletions

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