From e8abdfb874a1f63c8cda9335d177a6db5b2353e7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 20 Nov 2014 17:21:05 -0600 Subject: dosfs/fat_fat_operations.c: Explicitly ignore return (Coverity ID 26048) Coverity spotted that the return code from fat_set_fat_cluster() was ignored. But it should be because we want to return the status that caused us to hit the cleanup path. --- cpukit/libfs/src/dosfs/fat_fat_operations.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.c b/cpukit/libfs/src/dosfs/fat_fat_operations.c index 172c371e74..71fbe07772 100644 --- a/cpukit/libfs/src/dosfs/fat_fat_operations.c +++ b/cpukit/libfs/src/dosfs/fat_fat_operations.c @@ -150,8 +150,13 @@ cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); - /* trying to save last allocated cluster for future use */ - fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); + + /* + * Trying to save last allocated cluster for future use + * + * NOTE: Deliberately ignoring return value. + */ + (void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } -- cgit v1.2.3