From cefc190b1b105acfcf9e603b9ce2c9119c1d184b Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Thu, 15 Nov 2007 23:36:30 +0100 Subject: [sparse] declare functions static, use NULL as NULL pointer this fixes: fs/fs.c:210:6: warning: symbol 'files' was not declared. Should it be static? fs/fs.c:212:6: warning: symbol 'get_file' was not declared. Should it be static? fs/fs.c:227:6: warning: symbol 'put_file' was not declared. Should it be static? fs/fs.c:248:5: warning: symbol 'dir_is_empty' was not declared. Should it be static? fs/fs.c:613:41: warning: Using plain integer as NULL pointer Signed-off-by: Marc Kleine-Budde --- fs/fs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index 3aabb178a4..8d39232818 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -207,9 +207,9 @@ const char *fsdev_get_mountpoint(struct fs_device_d *fsdev) return fsdev->mtab.path; } -FILE files[MAX_FILES]; +static FILE files[MAX_FILES]; -FILE *get_file(void) +static FILE *get_file(void) { int i; @@ -224,7 +224,7 @@ FILE *get_file(void) return NULL; } -void put_file(FILE *f) +static void put_file(FILE *f) { files[f->no].in_use = 0; } @@ -245,7 +245,7 @@ static struct device_d *get_fs_device_by_path(char **path) return dev; } -int dir_is_empty(const char *pathname) +static int dir_is_empty(const char *pathname) { DIR *dir; struct dirent *d; @@ -610,7 +610,7 @@ int mount(const char *device, const char *fsname, const char *_path) struct fs_driver_d *fs_drv; struct mtab_entry *entry; struct fs_device_d *fsdev; - struct device_d *dev, *parent_device = 0; + struct device_d *dev, *parent_device = NULL; int ret; char *path = normalise_path(_path); -- cgit v1.2.3