mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
scan-build: remove dead stores
This commit is contained in:
parent
228bd17237
commit
33862979da
2
USAGE.md
2
USAGE.md
@ -1790,7 +1790,7 @@ cells_load_box(struct ncplane* n, uint32_t style, uint64_t channels,
|
||||
if((ulen = cell_prime(n, ll, gclusters += ulen, style, channels)) > 0){
|
||||
if((ulen = cell_prime(n, lr, gclusters += ulen, style, channels)) > 0){
|
||||
if((ulen = cell_prime(n, hl, gclusters += ulen, style, channels)) > 0){
|
||||
if((ulen = cell_prime(n, vl, gclusters += ulen, style, channels)) > 0){
|
||||
if(cell_prime(n, vl, gclusters + ulen, style, channels) > 0){
|
||||
return 0;
|
||||
}
|
||||
cell_release(n, hl);
|
||||
|
@ -2192,7 +2192,7 @@ cells_load_box(struct ncplane* n, uint32_t styles, uint64_t channels,
|
||||
if((ulen = cell_prime(n, ll, gclusters += ulen, styles, channels)) > 0){
|
||||
if((ulen = cell_prime(n, lr, gclusters += ulen, styles, channels)) > 0){
|
||||
if((ulen = cell_prime(n, hl, gclusters += ulen, styles, channels)) > 0){
|
||||
if((ulen = cell_prime(n, vl, gclusters += ulen, styles, channels)) > 0){
|
||||
if(cell_prime(n, vl, gclusters + ulen, styles, channels) > 0){
|
||||
return 0;
|
||||
}
|
||||
cell_release(n, hl);
|
||||
|
@ -35,7 +35,6 @@ fdthread(ncfdplane* ncfp, int pidfd){
|
||||
struct pollfd pfds[2];
|
||||
memset(pfds, 0, sizeof(pfds));
|
||||
char* buf = malloc(BUFSIZ + 1);
|
||||
int pevents;
|
||||
pfds[0].fd = ncfp->fd;
|
||||
pfds[0].events = NCPOLLEVENTS;
|
||||
const int fdcount = pidfd < 0 ? 1 : 2;
|
||||
@ -44,7 +43,7 @@ fdthread(ncfdplane* ncfp, int pidfd){
|
||||
pfds[1].events = NCPOLLEVENTS;
|
||||
}
|
||||
ssize_t r = 0;
|
||||
while((pevents = poll(pfds, fdcount, -1)) >= 0 || errno == EINTR){
|
||||
while(poll(pfds, fdcount, -1) >= 0 || errno == EINTR){
|
||||
if(pfds[0].revents){
|
||||
while((r = read(ncfp->fd, buf, BUFSIZ)) >= 0){
|
||||
if(r == 0){
|
||||
|
@ -267,7 +267,7 @@ ncvisual* ncvisual_from_file(const char* filename) {
|
||||
goto err;
|
||||
}
|
||||
// FIXME do we need avcodec_parameters_to_context() here?
|
||||
if((averr = avcodec_open2(ncv->details.subtcodecctx, ncv->details.subtcodec, nullptr)) < 0){
|
||||
if(avcodec_open2(ncv->details.subtcodecctx, ncv->details.subtcodec, nullptr) < 0){
|
||||
//fprintf(stderr, "Couldn't open codec for %s (%s)\n", filename, av_err2str(*averr));
|
||||
goto err;
|
||||
}
|
||||
@ -296,7 +296,7 @@ ncvisual* ncvisual_from_file(const char* filename) {
|
||||
if(avcodec_parameters_to_context(ncv->details.codecctx, st->codecpar) < 0){
|
||||
goto err;
|
||||
}
|
||||
if((averr = avcodec_open2(ncv->details.codecctx, ncv->details.codec, nullptr)) < 0){
|
||||
if(avcodec_open2(ncv->details.codecctx, ncv->details.codec, nullptr) < 0){
|
||||
//fprintf(stderr, "Couldn't open codec for %s (%s)\n", filename, av_err2str(*averr));
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user