[libglnx/wip/smcv/warnings: 2/7] fdio, xattrs: Mark unused cancellables as such




commit 2d007fa1c0dcbd93206139ed10e238f3696c5206
Author: Simon McVittie <smcv collabora com>
Date:   Sun Apr 24 11:02:48 2022 +0100

    fdio, xattrs: Mark unused cancellables as such
    
    These functions take a GCancellable for consistency with other file
    APIs, but are not actually cancellable at the moment.
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 glnx-fdio.c   | 4 ++--
 glnx-xattrs.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glnx-fdio.c b/glnx-fdio.c
index b3a6239..c2896f3 100644
--- a/glnx-fdio.c
+++ b/glnx-fdio.c
@@ -660,7 +660,7 @@ glnx_file_get_contents_utf8_at (int                   dfd,
 char *
 glnx_readlinkat_malloc (int            dfd,
                         const char    *subpath,
-                        GCancellable  *cancellable,
+                        G_GNUC_UNUSED GCancellable *cancellable,
                         GError       **error)
 {
   dfd = glnx_dirfd_canonicalize (dfd);
@@ -1106,7 +1106,7 @@ glnx_file_replace_contents_with_perms_at (int                   dfd,
                                           uid_t                 uid,
                                           gid_t                 gid,
                                           GLnxFileReplaceFlags  flags,
-                                          GCancellable         *cancellable,
+                                          G_GNUC_UNUSED GCancellable *cancellable,
                                           GError              **error)
 {
   char *dnbuf = strdupa (subpath);
diff --git a/glnx-xattrs.c b/glnx-xattrs.c
index 32479cc..d0e6ab3 100644
--- a/glnx-xattrs.c
+++ b/glnx-xattrs.c
@@ -141,7 +141,7 @@ static gboolean
 get_xattrs_impl (const char      *path,
                  int              fd,
                  GVariant       **out_xattrs,
-                 GCancellable    *cancellable,
+                 G_GNUC_UNUSED GCancellable *cancellable,
                  GError         **error)
 {
   gboolean ret = FALSE;
@@ -269,7 +269,7 @@ glnx_dfd_name_get_all_xattrs (int            dfd,
 static gboolean
 set_all_xattrs_for_path (const char    *path,
                          GVariant      *xattrs,
-                         GCancellable  *cancellable,
+                         G_GNUC_UNUSED GCancellable *cancellable,
                          GError       **error)
 {
   const guint n = g_variant_n_children (xattrs);
@@ -337,7 +337,7 @@ glnx_dfd_name_set_all_xattrs (int            dfd,
 gboolean
 glnx_fd_set_all_xattrs (int            fd,
                         GVariant      *xattrs,
-                        GCancellable  *cancellable,
+                        G_GNUC_UNUSED GCancellable *cancellable,
                         GError       **error)
 {
   const guint n = g_variant_n_children (xattrs);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]