aboutsummaryrefslogtreecommitdiff
path: root/example/null.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-08-03 09:11:06 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-08-03 09:11:06 +0000
commitf6e0ec6e2df64ce90e3a52a3e636f3ffb5c38927 (patch)
treed1187895079752b51f2bbdba465bd1aac5e65a09 /example/null.c
parent6c0209a8c78c82800a43c29a5dcccf872bfa613e (diff)
fix
Diffstat (limited to 'example/null.c')
-rw-r--r--example/null.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/example/null.c b/example/null.c
index d58feab..d9539ab 100644
--- a/example/null.c
+++ b/example/null.c
@@ -12,8 +12,6 @@
#include <time.h>
#include <errno.h>
-#define UNUSED(x) x __attribute__((unused))
-
static int null_getattr(const char *path, struct stat *stbuf)
{
if(strcmp(path, "/") != 0)
@@ -30,34 +28,46 @@ static int null_getattr(const char *path, struct stat *stbuf)
return 0;
}
-static int null_truncate(const char *path, off_t UNUSED(size))
+static int null_truncate(const char *path, off_t size)
{
+ (void) size;
+
if(strcmp(path, "/") != 0)
return -ENOENT;
return 0;
}
-static int null_open(const char *path, struct fuse_file_info *UNUSED(fi))
+static int null_open(const char *path, struct fuse_file_info *fi)
{
+ (void) fi;
+
if(strcmp(path, "/") != 0)
return -ENOENT;
return 0;
}
-static int null_read(const char *path, char *UNUSED(buf), size_t size,
- off_t UNUSED(offset), struct fuse_file_info *UNUSED(fi))
+static int null_read(const char *path, char *buf, size_t size,
+ off_t offset, struct fuse_file_info *fi)
{
+ (void) buf;
+ (void) offset;
+ (void) fi;
+
if(strcmp(path, "/") != 0)
return -ENOENT;
return size;
}
-static int null_write(const char *path, const char *UNUSED(buf), size_t size,
- off_t UNUSED(offset), struct fuse_file_info *UNUSED(fi))
+static int null_write(const char *path, const char *buf, size_t size,
+ off_t offset, struct fuse_file_info *fi)
{
+ (void) buf;
+ (void) offset;
+ (void) fi;
+
if(strcmp(path, "/") != 0)
return -ENOENT;