[glib] glocalfileoutputstream: Drop unnecessary (void) return value casts
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glocalfileoutputstream: Drop unnecessary (void) return value casts
- Date: Thu, 16 Jun 2016 18:46:08 +0000 (UTC)
commit fadd00c7085fd0dc2722c974260768540cc6f8b9
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Jun 16 14:45:21 2016 -0400
glocalfileoutputstream: Drop unnecessary (void) return value casts
g_close() does not have G_GNUC_WARN_UNUSED_RESULT, so these casts are
unnecessary.
gio/glocalfileoutputstream.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index b4f348e..491d799 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -349,7 +349,7 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file,
#ifndef G_OS_WIN32
/* A simple try to close the fd in case we fail before the actual close */
- (void) g_close (file->priv->fd, NULL);
+ g_close (file->priv->fd, NULL);
#endif
if (file->priv->tmp_filename)
g_unlink (file->priv->tmp_filename);
@@ -893,14 +893,14 @@ handle_overwrite_open (const char *filename,
original_stat.st_gid != tmp_statbuf.st_gid ||
original_stat.st_mode != tmp_statbuf.st_mode)
{
- (void) g_close (tmpfd, NULL);
+ g_close (tmpfd, NULL);
g_unlink (tmp_filename);
g_free (tmp_filename);
goto fallback_strategy;
}
}
- (void) g_close (fd, NULL);
+ g_close (fd, NULL);
*temp_filename = tmp_filename;
return tmpfd;
}
@@ -953,7 +953,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_CANT_CREATE_BACKUP,
_("Backup file creation failed"));
g_unlink (backup_filename);
- (void) g_close (bfd, NULL);
+ g_close (bfd, NULL);
g_free (backup_filename);
goto err_out;
}
@@ -970,7 +970,7 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_CANT_CREATE_BACKUP,
_("Backup file creation failed"));
g_unlink (backup_filename);
- (void) g_close (bfd, NULL);
+ g_close (bfd, NULL);
g_free (backup_filename);
goto err_out;
}
@@ -984,13 +984,13 @@ handle_overwrite_open (const char *filename,
G_IO_ERROR_CANT_CREATE_BACKUP,
_("Backup file creation failed"));
g_unlink (backup_filename);
- (void) g_close (bfd, NULL);
+ g_close (bfd, NULL);
g_free (backup_filename);
goto err_out;
}
- (void) g_close (bfd, NULL);
+ g_close (bfd, NULL);
g_free (backup_filename);
/* Seek back to the start of the file after the backup copy */
@@ -1008,7 +1008,7 @@ handle_overwrite_open (const char *filename,
if (flags & G_FILE_CREATE_REPLACE_DESTINATION)
{
- (void) g_close (fd, NULL);
+ g_close (fd, NULL);
if (g_unlink (filename) != 0)
{
@@ -1060,7 +1060,7 @@ handle_overwrite_open (const char *filename,
return fd;
err_out:
- (void) g_close (fd, NULL);
+ g_close (fd, NULL);
err_out2:
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]