diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2018-06-04 17:32:34 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2018-06-14 16:19:10 +0200 |
commit | d12c5f3d31391eefaf330c9598e1195d96935025 (patch) | |
tree | 1ad5a8b3ab1507653b0b823970c60e923964d556 | |
parent | 2aa3d2035190c7838c355b986749104a1d9f6e64 (diff) | |
download | initscripts-d12c5f3d31391eefaf330c9598e1195d96935025.tar initscripts-d12c5f3d31391eefaf330c9598e1195d96935025.tar.gz initscripts-d12c5f3d31391eefaf330c9598e1195d96935025.tar.bz2 initscripts-d12c5f3d31391eefaf330c9598e1195d96935025.tar.xz initscripts-d12c5f3d31391eefaf330c9598e1195d96935025.zip |
src/rename_device.c: GCC warnings about unused return value suppressed
-rw-r--r-- | src/rename_device.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rename_device.c b/src/rename_device.c index 6d6030eb..c39f447d 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -281,6 +281,7 @@ char *get_config_by_hwaddr(char *hwaddr, char *current) { void take_lock() { int count = 0; int lockfd; + ssize_t ignored_retval __attribute__((unused)); while (1) { lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL, 0644); @@ -288,7 +289,7 @@ void take_lock() { char buf[32]; snprintf(buf,32,"%d\n",getpid()); - write(lockfd,buf,strlen(buf)); + ignored_retval = write(lockfd,buf,strlen(buf)); close(lockfd); break; } else if (errno == EACCES) @@ -304,7 +305,7 @@ void take_lock() { fd = open(LOCKFILE, O_RDONLY); if (fd == -1) break; - read(fd,buf,32); + ignored_retval = read(fd,buf,32); close(fd); pid = atoi(buf); if (pid && pid != 1) { |