anchao commented on code in PR #6997: URL: https://github.com/apache/incubator-nuttx/pull/6997#discussion_r962919729
########## net/procfs/net_procfs.c: ########## @@ -98,6 +116,32 @@ static int netprocfs_rewinddir(FAR struct fs_dirent_s *dir); static int netprocfs_stat(FAR const char *relpath, FAR struct stat *buf); +/**************************************************************************** + * Private Data + ****************************************************************************/ + +extern const struct procfs_operations net_procfs_routeoperations; + +/* Netprocfs component mappings */ + +static const struct netprocfs_entry_s g_net_entries[] = +{ +#ifdef CONFIG_NET_STATISTICS + { NETPROCFS_SUBDIR_STAT, DTYPE_FILE, "stat", + { netprocfs_read_netstats } }, +# ifdef CONFIG_NET_MLD + { NETPROCFS_SUBDIR_MLD, DTYPE_FILE, "mld", + { netprocfs_read_mldstats } }, +# endif +#endif +#ifdef CONFIG_NET_ROUTE + { NETPROCFS_SUBDIR_ROUTE, DTYPE_DIRECTORY, "route", + { (FAR void *)&net_procfs_routeoperations } }, Review Comment: incompatible pointer type: ``` procfs/net_procfs.c:164:7: warning: initialization of ‘ssize_t (*)(struct netprocfs_file_s *, char *, size_t)’ {aka ‘long int (*)(struct netprocfs_file_s *, char *, long unsigned int)’} from incompatible pointer type ‘const struct procfs_operations *’ [-Wincompatible-pointer-types] 164 | &net_procfs_routeoperations | ^ procfs/net_procfs.c:164:7: note: (near initialization for ‘g_net_entries[2].u.stat’) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org