From e2c58534ca9fa4eea73d58710777d774cf46bf0d Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 18 Dec 2019 21:05:59 -0500 Subject: [PATCH] work around -Wclobbered-noted problem --- src/lib/render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/render.c b/src/lib/render.c index 850a0c7ec..66bda730d 100644 --- a/src/lib/render.c +++ b/src/lib/render.c @@ -38,13 +38,15 @@ blocking_write(int fd, const char* buf, size_t buflen){ } int notcurses_refresh(notcurses* nc){ - int ret = 0; + int ret; pthread_mutex_lock(&nc->lock); pthread_cleanup_push(mutex_unlock, &nc->lock); if(nc->mstream == NULL){ ret = -1; // haven't rendered yet, and thus don't know what should be there }else if(blocking_write(nc->ttyfd, nc->mstream, nc->mstrsize)){ ret = -1; + }else{ + ret = 0; } pthread_cleanup_pop(1); return ret;