[dm-devel] [PATCH 36/39] libmultipath: Ignore errors from fcntl() in directio.c

Hannes Reinecke hare at suse.de
Thu Jun 16 09:47:42 UTC 2016


Mark the return value from fcntl() as unused to avoid compiler
warnings.
Found by coverity.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 libmultipath/checkers/directio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
index 46fe6a7..94bf8f7 100644
--- a/libmultipath/checkers/directio.c
+++ b/libmultipath/checkers/directio.c
@@ -104,9 +104,11 @@ void libcheck_free (struct checker * c)
 
 	if (ct->reset_flags) {
 		if ((flags = fcntl(c->fd, F_GETFL)) >= 0) {
+			int ret __attribute__ ((unused));
+
 			flags &= ~O_DIRECT;
 			/* No point in checking for errors */
-			fcntl(c->fd, F_SETFL, flags);
+			ret = fcntl(c->fd, F_SETFL, flags);
 		}
 	}
 
-- 
2.6.6




More information about the dm-devel mailing list