From 5da4239746c11f1f048d03dad1d1a193486f71c8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 Sep 2009 13:48:16 +0200 Subject: [PATCH] libblkid: fix gcc warning (warn_unused_result) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit save.c: In function ‘blkid_flush_cache’: save.c:146: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result Signed-off-by: Karel Zak --- shlibs/blkid/src/save.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shlibs/blkid/src/save.c b/shlibs/blkid/src/save.c index bbe6f488..c61373d5 100644 --- a/shlibs/blkid/src/save.c +++ b/shlibs/blkid/src/save.c @@ -143,7 +143,11 @@ int blkid_flush_cache(blkid_cache cache) if (backup) { sprintf(backup, "%s.old", filename); unlink(backup); - link(filename, backup); + if (link(filename, backup)) { + DBG(DEBUG_SAVE, + printf("can't link %s to %s\n", + filename, backup)); + } free(backup); } rename(opened, filename); -- 2.39.5