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

[Minios-devel] [UNIKRAFT PATCH v2 19/23] lib/vfscore: fix compiler complains



Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
 lib/vfscore/include/vfscore/vnode.h |  2 +-
 lib/vfscore/main.c                  | 24 ++++++++++++------------
 lib/vfscore/syscalls.c              |  8 ++++----
 lib/vfscore/task.c                  |  2 +-
 lib/vfscore/vnode.c                 |  8 ++++----
 5 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/lib/vfscore/include/vfscore/vnode.h 
b/lib/vfscore/include/vfscore/vnode.h
index fe14bc82..1348f579 100644
--- a/lib/vfscore/include/vfscore/vnode.h
+++ b/lib/vfscore/include/vfscore/vnode.h
@@ -167,7 +167,7 @@ typedef     int (*vnop_truncate_t)  (struct vnode *, off_t);
 typedef        int (*vnop_link_t)      (struct vnode *, struct vnode *, char 
*);
 typedef int (*vnop_cache_t) (struct vnode *, struct vfscore_file *, struct uio 
*);
 typedef int (*vnop_fallocate_t) (struct vnode *, int, off_t, off_t);
-typedef int (*vnop_readlink_t)  (struct vnode *, struct uio *);
+typedef ssize_t (*vnop_readlink_t)  (struct vnode *, struct uio *);
 typedef int (*vnop_symlink_t)   (struct vnode *, char *, char *);
 
 /*
diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index 0ff8d390..d7aba756 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -246,8 +246,7 @@ TRACEPOINT(trace_vfs_mknod, "\"%s\" 0%0o 0x%x", const 
char*, mode_t, dev_t);
 TRACEPOINT(trace_vfs_mknod_ret, "");
 TRACEPOINT(trace_vfs_mknod_err, "%d", int);
 
-
-int __xmknod(int ver, const char *pathname, mode_t mode, dev_t *dev)
+int __xmknod(int ver, const char *pathname, mode_t mode, dev_t *dev __unused)
 {
        UK_ASSERT(ver == 0); // On x86-64 Linux, _MKNOD_VER_LINUX is 0.
        struct task *t = main_task;
@@ -541,7 +540,7 @@ TRACEPOINT(trace_vfs_fstat, "%d %p", int, struct stat*);
 TRACEPOINT(trace_vfs_fstat_ret, "");
 TRACEPOINT(trace_vfs_fstat_err, "%d", int);
 
-int __fxstat(int ver, int fd, struct stat *st)
+int __fxstat(int ver __unused, int fd, struct stat *st)
 {
        struct vfscore_file *fp;
        int error;
@@ -568,14 +567,14 @@ int __fxstat(int ver, int fd, struct stat *st)
 
 LFS64(__fxstat);
 
-int fstat(int fd, struct stat *st)
+int fstat(int fd __unused, struct stat *st)
 {
        return __fxstat(1, fd, st);
 }
 
 LFS64(fstat);
 
-int __fxstatat(int ver, int dirfd, const char *pathname, struct stat *st,
+int __fxstatat(int ver __unused, int dirfd, const char *pathname, struct stat 
*st,
                int flags)
 {
        if (flags & AT_SYMLINK_NOFOLLOW) {
@@ -1113,7 +1112,7 @@ TRACEPOINT(trace_vfs_stat, "\"%s\" %p", const char*, 
struct stat*);
 TRACEPOINT(trace_vfs_stat_ret, "");
 TRACEPOINT(trace_vfs_stat_err, "%d", int);
 
-int __xstat(int ver, const char *pathname, struct stat *st)
+int __xstat(int ver __unused, const char *pathname, struct stat *st)
 {
        struct task *t = main_task;
        char path[PATH_MAX];
@@ -1149,7 +1148,8 @@ LFS64(stat);
 TRACEPOINT(trace_vfs_lstat, "pathname=%s, stat=%p", const char*, struct stat*);
 TRACEPOINT(trace_vfs_lstat_ret, "");
 TRACEPOINT(trace_vfs_lstat_err, "errno=%d", int);
-int __lxstat(int ver, const char *pathname, struct stat *st)
+
+int __lxstat(int ver __unused, const char *pathname, struct stat *st)
 {
        struct task *t = main_task;
        char path[PATH_MAX];
@@ -1922,7 +1922,7 @@ int fchmod(int fd, mode_t mode)
 TRACEPOINT(trace_vfs_fchown, "\"%d\" %d %d", int, uid_t, gid_t);
 TRACEPOINT(trace_vfs_fchown_ret, "");
 
-int fchown(int fd, uid_t owner, gid_t group)
+int fchown(int fd __unused, uid_t owner __unused, gid_t group __unused)
 {
        trace_vfs_fchown(fd, owner, group);
        WARN_STUBBED();
@@ -1930,13 +1930,13 @@ int fchown(int fd, uid_t owner, gid_t group)
        return 0;
 }
 
-int chown(const char *path, uid_t owner, gid_t group)
+int chown(const char *path __unused, uid_t owner __unused, gid_t group 
__unused)
 {
        WARN_STUBBED();
        return 0;
 }
 
-int lchown(const char *path, uid_t owner, gid_t group)
+int lchown(const char *path __unused, uid_t owner __unused, gid_t group 
__unused)
 {
        WARN_STUBBED();
        return 0;
@@ -2026,7 +2026,7 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *_offset, 
size_t count)
 LFS64(sendfile);
 #endif
 
-NO_SYS(int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags));
+NO_SYS(int fchmodat(int dirfd __unused, const char *pathname __unused, mode_t 
mode __unused, int flags __unused));
 
 mode_t umask(mode_t newmask)
 {
@@ -2039,7 +2039,7 @@ fs_noop(void)
        return 0;
 }
 
-int chroot(const char *path)
+int chroot(const char *path __unused)
 {
        WARN_STUBBED();
        errno = ENOSYS;
diff --git a/lib/vfscore/syscalls.c b/lib/vfscore/syscalls.c
index 33004960..bfed2c21 100644
--- a/lib/vfscore/syscalls.c
+++ b/lib/vfscore/syscalls.c
@@ -394,7 +394,7 @@ sys_fsync(struct vfscore_file *fp)
        struct vnode *vp;
        int error;
 
-       DPRINTF(VFSDB_SYSCALL, ("sys_fsync: fp=%x\n", fp));
+       DPRINTF(VFSDB_SYSCALL, ("sys_fsync: fp=%p\n", fp));
 
        if (!fp->f_dentry)
                return EINVAL;
@@ -411,7 +411,7 @@ sys_fstat(struct vfscore_file *fp, struct stat *st)
 {
        int error = 0;
 
-       DPRINTF(VFSDB_SYSCALL, ("sys_fstat: fp=%x\n", fp));
+       DPRINTF(VFSDB_SYSCALL, ("sys_fstat: fp=%p\n", fp));
 
        error = vfs_stat(fp, st);
 
@@ -458,7 +458,7 @@ sys_readdir(struct vfscore_file *fp, struct dirent *dir)
        struct vnode *dvp;
        int error;
 
-       DPRINTF(VFSDB_SYSCALL, ("sys_readdir: fp=%x\n", fp));
+       DPRINTF(VFSDB_SYSCALL, ("sys_readdir: fp=%p\n", fp));
 
        if (!fp->f_dentry)
                return ENOTDIR;
@@ -1433,7 +1433,7 @@ sys_fallocate(struct vfscore_file *fp, int mode, off_t 
offset, off_t len)
        int error;
        struct vnode *vp;
 
-       DPRINTF(VFSDB_SYSCALL, ("sys_fallocate: fp=%x", fp));
+       DPRINTF(VFSDB_SYSCALL, ("sys_fallocate: fp=%p", fp));
 
        if (!fp->f_dentry || !(fp->f_flags & FWRITE)) {
                return EBADF;
diff --git a/lib/vfscore/task.c b/lib/vfscore/task.c
index 7635bd7a..e658bdaa 100644
--- a/lib/vfscore/task.c
+++ b/lib/vfscore/task.c
@@ -129,7 +129,7 @@ path_conv(char *wd, const char *cpath, char *full)
  * @acc: access mode
  */
 int
-task_conv(struct task *t, const char *cpath, int acc, char *full)
+task_conv(struct task *t, const char *cpath, int acc __unused, char *full)
 {
        int rc;
 
diff --git a/lib/vfscore/vnode.c b/lib/vfscore/vnode.c
index e9e040aa..d70746c9 100644
--- a/lib/vfscore/vnode.c
+++ b/lib/vfscore/vnode.c
@@ -179,7 +179,7 @@ vfscore_vget(struct mount *mp, uint64_t ino, struct vnode 
**vpp)
 
        *vpp = NULL;
 
-       DPRINTF(VFSDB_VNODE, ("vget %LLu\n", ino));
+       DPRINTF(VFSDB_VNODE, ("vfscore_vget %llu\n", (unsigned long long) ino));
 
        VNODE_LOCK();
 
@@ -300,7 +300,7 @@ vrele(struct vnode *vp)
  * Remove all vnode in the vnode table for unmount.
  */
 void
-vflush(struct mount *mp)
+vflush(struct mount *mp __unused)
 {
 }
 
@@ -512,7 +512,7 @@ vnode_init(void)
                UK_INIT_LIST_HEAD(&vnode_table[i]);
 }
 
-void vn_add_name(struct vnode *vp, struct dentry *dp)
+void vn_add_name(struct vnode *vp __unused, struct dentry *dp)
 {
        /* TODO: Re-enable this check when preemption and/or smp is
         * here */
@@ -520,7 +520,7 @@ void vn_add_name(struct vnode *vp, struct dentry *dp)
        uk_list_add(&dp->d_names_link, &vp->v_names);
 }
 
-void vn_del_name(struct vnode *vp, struct dentry *dp)
+void vn_del_name(struct vnode *vp __unused, struct dentry *dp)
 {
        /* TODO: Re-enable this check when preemption and/or smp is
         * here */
-- 
2.19.2


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.