From: Karel Zak Date: Tue, 29 Sep 2009 11:48:16 +0000 (+0200) Subject: libblkid: fix gcc warning (warn_unused_result) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5da4239746c11f1f048d03dad1d1a193486f71c8;p=util-linux libblkid: fix gcc warning (warn_unused_result) 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 --- 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);