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

[Minios-devel] [UNIKRAFT PATCH 18/22] 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 9cdd3844..e0420ae1 100644
--- a/lib/vfscore/include/vfscore/vnode.h
+++ b/lib/vfscore/include/vfscore/vnode.h
@@ -164,7 +164,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 98506ad6..16ea0015 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -250,8 +250,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;
@@ -545,7 +544,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;
@@ -572,14 +571,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) {
@@ -1117,7 +1116,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];
@@ -1153,7 +1152,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];
@@ -1926,7 +1926,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();
@@ -1934,13 +1934,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;
@@ -2030,7 +2030,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)
 {
@@ -2043,7 +2043,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 0b3e6986..28439f51 100644
--- a/lib/vfscore/syscalls.c
+++ b/lib/vfscore/syscalls.c
@@ -398,7 +398,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;
@@ -415,7 +415,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);
 
@@ -462,7 +462,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;
@@ -1437,7 +1437,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 68b787a0..46743c17 100644
--- a/lib/vfscore/task.c
+++ b/lib/vfscore/task.c
@@ -125,7 +125,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 f4c94bb8..f483d19b 100644
--- a/lib/vfscore/vnode.c
+++ b/lib/vfscore/vnode.c
@@ -176,7 +176,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();
 
@@ -297,7 +297,7 @@ vrele(struct vnode *vp)
  * Remove all vnode in the vnode table for unmount.
  */
 void
-vflush(struct mount *mp)
+vflush(struct mount *mp __unused)
 {
 }
 
@@ -509,7 +509,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 */
@@ -517,7 +517,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®.