Skip to content

Commit

Permalink
r.mfilter: check return value of write() (#2737)
Browse files Browse the repository at this point in the history
addresses -Wunused-result compiler warning
  • Loading branch information
nilason committed Jan 10, 2023
1 parent 4e4e38f commit 83da642
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raster/r.mfilter/execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ int execute_filter(ROWIO *r, int *out, FILTER *filter, DCELL **cell)
*cp++ = bufs[id][mid][i];

/* write row */
write(out[id], cellp, buflen);
if (write(out[id], cellp, buflen) < 0)
G_fatal_error("Error writing temporary file");
#pragma omp atomic update
work++;
}
Expand Down

0 comments on commit 83da642

Please sign in to comment.