This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master in repository gfs2-utils.
commit 555365ffde93b103922cff8acf8ffcb819ed7d66 Author: Andrew Price anprice@redhat.com Date: Thu Aug 3 16:52:54 2017 +0100
gfs2_grow: Fix unchecked ftruncate return value warning
main_grow.c:308:2: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/mkfs/main_grow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c index 66ba057..10676a1 100644 --- a/gfs2/mkfs/main_grow.c +++ b/gfs2/mkfs/main_grow.c @@ -305,7 +305,8 @@ trunc: count = (count / sizeof(struct gfs2_rindex)) + old_rg_count; log_crit(_("truncating rindex to %ld entries\n"), (long)count * sizeof(struct gfs2_rindex)); - ftruncate(rindex_fd, (off_t)count * sizeof(struct gfs2_rindex)); + if (ftruncate(rindex_fd, (off_t)count * sizeof(struct gfs2_rindex))) + log_crit(_("Could not truncate rindex: %s\n"), strerror(errno)); free(buf); }
cluster-commits@lists.stg.fedorahosted.org