From f5fb7c713ea443469406a691e60a6f4567a4cb75 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon, 17 Jan 2022 00:32:29 +0100
Subject: Fix const warnings

Now that the RPCs have const, this forces us cleaning our const-meant
functions.
---
 libdiskfs/dir-lookup.c     | 2 +-
 libdiskfs/file-set-trans.c | 2 +-
 libdiskfs/io-write.c       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'libdiskfs')

diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 55439b08..b39868ae 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -76,7 +76,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
 
   /* Keep a pointer to the start of the filename for length
      calculations.  */
-  char *filename_start = filename;
+  const char *filename_start = filename;
 
   *retry_port_type = MACH_MSG_TYPE_MAKE_SEND;
   *do_retry = FS_RETRY_NORMAL;
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c
index b55967f9..36f0c3b8 100644
--- a/libdiskfs/file-set-trans.c
+++ b/libdiskfs/file-set-trans.c
@@ -198,7 +198,7 @@ diskfs_S_file_set_translator (struct protid *cred,
 		  if (!diskfs_create_symlink_hook || err == EINVAL)
 		    /* Store the argument in the file as the
 		       target of the link */
-		    err = diskfs_node_rdwr (np, arg, 0, strlen (arg),
+		    err = diskfs_node_rdwr (np, (char*) arg, 0, strlen (arg),
 					      1, cred, 0);
 		  if (err)
 		    {
diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
index fa451d8b..154bc887 100644
--- a/libdiskfs/io-write.c
+++ b/libdiskfs/io-write.c
@@ -76,7 +76,7 @@ diskfs_S_io_write (struct protid *cred,
     }
 
   *amt = datalen;
-  err = _diskfs_rdwr_internal (np, data, off, amt, 1, 0);
+  err = _diskfs_rdwr_internal (np, (char*) data, off, amt, 1, 0);
 
   if (!err && offset == -1)
     cred->po->filepointer += *amt;
-- 
cgit v1.2.3