summaryrefslogtreecommitdiffstats
path: root/osdep-darwin.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2019-04-10 19:27:09 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2019-04-10 19:27:09 +0100
commite6ee3e9504e0abc9014e1b20ac6a9c43dd6145fb (patch)
treee768698a6eb634119d7d3de69f21ea12f657e82a /osdep-darwin.c
parent1c1ec84aa3362bd9d87f32a7afa6d07017adccfc (diff)
Warning fixes from Carlo Marcelo Arenas Belón.
Diffstat (limited to 'osdep-darwin.c')
-rw-r--r--osdep-darwin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep-darwin.c b/osdep-darwin.c
index 5d69cdda..d4a88028 100644
--- a/osdep-darwin.c
+++ b/osdep-darwin.c
@@ -30,7 +30,9 @@ char *osdep_get_name(int, char *);
char *osdep_get_cwd(int);
struct event_base *osdep_event_init(void);
+#ifndef __unused
#define __unused __attribute__ ((__unused__))
+#endif
char *
osdep_get_name(int fd, __unused char *tty)
@@ -47,6 +49,7 @@ osdep_get_name(int fd, __unused char *tty)
&bsdinfo, sizeof bsdinfo);
if (ret == sizeof bsdinfo && *bsdinfo.pbsi_comm != '\0')
return (strdup(bsdinfo.pbsi_comm));
+ return (NULL);
#else
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, 0 };
size_t size;