From 1e2209348f5ef6e9a482c2030e955d5692163e81 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 13 Jan 2019 14:04:20 -0600 Subject: [PATCH] drivers/net/telnet.c: Eliminate some newly introduced warnings found in build testing. --- drivers/net/telnet.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c index a68d48aebc..5d9cbe0810 100644 --- a/drivers/net/telnet.c +++ b/drivers/net/telnet.c @@ -219,24 +219,30 @@ static const struct file_operations g_telnet_fops = telnet_close, /* close */ telnet_read, /* read */ telnet_write, /* write */ - 0, /* seek */ + NULL, /* seek */ common_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL , telnet_poll /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; static const struct file_operations g_factory_fops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ factory_read, /* read */ factory_write, /* write */ - 0, /* seek */ - common_ioctl /* ioctl */ + NULL, /* seek */ + common_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL , telnet_poll /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* Global information shared amongst telnet driver instanaces. */ @@ -1078,6 +1084,7 @@ static ssize_t factory_write(FAR struct file *filep, FAR const char *buffer, * ****************************************************************************/ +#ifndef CONFIG_DISABLE_POLL static int telnet_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) { @@ -1111,6 +1118,7 @@ static int telnet_poll(FAR struct file *filep, FAR struct pollfd *fds, return psock_poll(psock, fds, setup); } +#endif /**************************************************************************** * Name: common_ioctl