From owner-svn-src-head@freebsd.org Sat Apr 18 20:43:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32D812AD455; Sat, 18 Apr 2020 20:43:29 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494Q0K0G4Pz3PGh; Sat, 18 Apr 2020 20:43:28 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-qt1-f177.google.com with SMTP id c16so5272240qtv.1; Sat, 18 Apr 2020 13:43:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0TqaG4eMdMEW9jWUbLK595bYqvWFCiqAgGqAuPhjYPQ=; b=G85630PRdg4mG9zn8XjSUhWtkQF4zNDtVLislEnBlfmcWDE8oCR4ljrTraxXLr/fK4 6RRVCHU+V68Qt/EY1s7N0yrqhixkIo6ADxYDvbWDcu0xjpUpc2YK//OC4wrvk2ASZtqj LlSKLAgfxkIfTcuw0Dq9F16TBCFACPmGJp3b4giL2U3TQMo7JrD5QUBbJoR3JuIfR7lG j1xI04lHYgyzNXPGH/JlqYCqK37ERrNXoRf+MaFahb+0SGgAP46Ww/YuYjGoO+/h9c8s yUm/D/BJmZNbOQkBP6nFkJGjANf7I78b0dDyy9X3TX6EWzMxx+NJApgo2QHfNp7BtCg0 oh6w== X-Gm-Message-State: AGi0PuYT/R8ZPGPjH4ZX/IABhdTxT23qBE4Jdx25UlgCoaGtXZPj+qoo vIFczhLzcGthXvW1Bw5dspQjXnioPj0= X-Google-Smtp-Source: APiQypLvyaHIzLzQfkU7vwh4vGclfPyk2TYW8py8t6mCPKzY6/amgkNnGgGGLEkkW/YmRIHCPcM8cw== X-Received: by 2002:aed:2442:: with SMTP id s2mr9119535qtc.153.1587242607723; Sat, 18 Apr 2020 13:43:27 -0700 (PDT) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id v76sm20123203qka.32.2020.04.18.13.43.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Apr 2020 13:43:27 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id a9so3066588ybc.8; Sat, 18 Apr 2020 13:43:27 -0700 (PDT) X-Received: by 2002:a25:690b:: with SMTP id e11mr8081003ybc.152.1587242606509; Sat, 18 Apr 2020 13:43:26 -0700 (PDT) MIME-Version: 1.0 References: <202004181254.03ICslhN028317@repo.freebsd.org> In-Reply-To: From: Alexander Richardson Date: Sat, 18 Apr 2020 21:43:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360073 - head/tests/sys/kqueue/libkqueue To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 494Q0K0G4Pz3PGh X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2020 20:43:29 -0000 On Sat, 18 Apr 2020 at 20:13, Conrad Meyer wrote: > > Hi Alex, > > We usually do not use "extern" for function declarations in headers. > > Best, > Conrad Hi Conrad, I decided to follow the style that was used in the header already, but I agree those externs should probably be dropped. I can commit a follow-up change to remove them on Monday. Alex > > On Sat, Apr 18, 2020 at 5:55 AM Alex Richardson wrote: > > > > Author: arichardson > > Date: Sat Apr 18 12:54:47 2020 > > New Revision: 360073 > > URL: https://svnweb.freebsd.org/changeset/base/360073 > > > > Log: > > Fix various warnings in tests/sys/kqueue and bump WARNS > > > > Reviewed By: kevans > > Differential Revision: https://reviews.freebsd.org/D24296 > > > > Modified: > > head/tests/sys/kqueue/libkqueue/Makefile > > head/tests/sys/kqueue/libkqueue/common.h > > head/tests/sys/kqueue/libkqueue/main.c > > head/tests/sys/kqueue/libkqueue/proc.c > > head/tests/sys/kqueue/libkqueue/read.c > > head/tests/sys/kqueue/libkqueue/signal.c > > head/tests/sys/kqueue/libkqueue/timer.c > > head/tests/sys/kqueue/libkqueue/user.c > > head/tests/sys/kqueue/libkqueue/vnode.c > > > > Modified: head/tests/sys/kqueue/libkqueue/Makefile > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/Makefile Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/Makefile Sat Apr 18 12:54:47 2020 (r360073) > > @@ -16,6 +16,5 @@ SRCS.kqtest= \ > > proc.c \ > > signal.c \ > > user.c > > -WARNS?= 2 > > > > .include > > > > Modified: head/tests/sys/kqueue/libkqueue/common.h > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/common.h Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/common.h Sat Apr 18 12:54:47 2020 (r360073) > > @@ -40,7 +40,6 @@ > > > > #include > > > > -extern char *cur_test_id; > > extern int vnode_fd; > > extern int kqfd; > > > > @@ -76,5 +75,14 @@ extern void test_no_kevents_quietly(void); > > > > extern void test_begin(const char *); > > extern void success(void); > > + > > +extern void test_evfilt_read(void); > > +extern void test_evfilt_signal(void); > > +extern void test_evfilt_vnode(void); > > +extern void test_evfilt_timer(void); > > +extern void test_evfilt_proc(void); > > +#if HAVE_EVFILT_USER > > +extern void test_evfilt_user(void); > > +#endif > > > > #endif /* _COMMON_H */ > > > > Modified: head/tests/sys/kqueue/libkqueue/main.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/main.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -21,21 +21,12 @@ > > #include "config.h" > > #include "common.h" > > > > -int testnum = 1; > > -char *cur_test_id = NULL; > > int kqfd; > > +static char *cur_test_id = NULL; > > +static int testnum = 1; > > > > -extern void test_evfilt_read(); > > -extern void test_evfilt_signal(); > > -extern void test_evfilt_vnode(); > > -extern void test_evfilt_timer(); > > -extern void test_evfilt_proc(); > > -#if HAVE_EVFILT_USER > > -extern void test_evfilt_user(); > > -#endif > > - > > /* Checks if any events are pending, which is an error. */ > > -void > > +void > > test_no_kevents(void) > > { > > int nfds; > > @@ -58,7 +49,7 @@ test_no_kevents(void) > > /* Checks if any events are pending, which is an error. Do not print > > * out anything unless events are found. > > */ > > -void > > +void > > test_no_kevents_quietly(void) > > { > > int nfds; > > @@ -79,7 +70,7 @@ test_no_kevents_quietly(void) > > > > /* Retrieve a single kevent */ > > struct kevent * > > -kevent_get(int kqfd) > > +kevent_get(int fd) > > { > > int nfds; > > struct kevent *kev; > > @@ -87,7 +78,7 @@ kevent_get(int kqfd) > > if ((kev = calloc(1, sizeof(*kev))) == NULL) > > err(1, "out of memory"); > > > > - nfds = kevent(kqfd, NULL, 0, kev, 1, NULL); > > + nfds = kevent(fd, NULL, 0, kev, 1, NULL); > > if (nfds < 1) > > err(1, "kevent(2)"); > > > > @@ -96,7 +87,7 @@ kevent_get(int kqfd) > > > > /* Retrieve a single kevent, specifying a maximum time to wait for it. */ > > struct kevent * > > -kevent_get_timeout(int kqfd, int seconds) > > +kevent_get_timeout(int fd, int seconds) > > { > > int nfds; > > struct kevent *kev; > > @@ -105,7 +96,7 @@ kevent_get_timeout(int kqfd, int seconds) > > if ((kev = calloc(1, sizeof(*kev))) == NULL) > > err(1, "out of memory"); > > > > - nfds = kevent(kqfd, NULL, 0, kev, 1, &timeout); > > + nfds = kevent(fd, NULL, 0, kev, 1, &timeout); > > if (nfds < 0) { > > err(1, "kevent(2)"); > > } else if (nfds == 0) { > > @@ -116,7 +107,7 @@ kevent_get_timeout(int kqfd, int seconds) > > return (kev); > > } > > > > -char * > > +static char * > > kevent_fflags_dump(struct kevent *kev) > > { > > char *buf; > > @@ -166,7 +157,7 @@ kevent_fflags_dump(struct kevent *kev) > > return (buf); > > } > > > > -char * > > +static char * > > kevent_flags_dump(struct kevent *kev) > > { > > char *buf; > > @@ -227,7 +218,7 @@ kevent_to_str(struct kevent *kev) > > } > > > > void > > -kevent_add(int kqfd, struct kevent *kev, > > +kevent_add(int fd, struct kevent *kev, > > uintptr_t ident, > > short filter, > > u_short flags, > > @@ -237,8 +228,8 @@ kevent_add(int kqfd, struct kevent *kev, > > { > > char *kev_str; > > > > - EV_SET(kev, ident, filter, flags, fflags, data, NULL); > > - if (kevent(kqfd, kev, 1, NULL, 0, NULL) < 0) { > > + EV_SET(kev, ident, filter, flags, fflags, data, udata); > > + if (kevent(fd, kev, 1, NULL, 0, NULL) < 0) { > > kev_str = kevent_to_str(kev); > > printf("Unable to add the following kevent:\n%s\n", > > kev_str); > > @@ -295,7 +286,7 @@ success(void) > > cur_test_id = NULL; > > } > > > > -void > > +static void > > test_kqueue(void) > > { > > test_begin("kqueue()"); > > @@ -305,7 +296,7 @@ test_kqueue(void) > > success(); > > } > > > > -void > > +static void > > test_kqueue_close(void) > > { > > test_begin("close(kq)"); > > > > Modified: head/tests/sys/kqueue/libkqueue/proc.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/proc.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/proc.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -27,7 +27,7 @@ static int sigusr1_caught = 0; > > > > > > static void > > -sig_handler(int signum) > > +sig_handler(__unused int signum) > > { > > sigusr1_caught = 1; > > } > > @@ -203,10 +203,10 @@ proc_track(int sleep_time) > > } > > > > if (kevp->fflags & NOTE_EXIT) { > > - if ((kevp->ident == pid) && (!child_exit)) { > > + if ((kevp->ident == (uintptr_t)pid) && (!child_exit)) { > > ++child_exit; > > ++handled; > > - } else if ((kevp->ident == gchild_pid) && (!gchild_exit)) { > > + } else if ((kevp->ident == (uintptr_t)gchild_pid) && (!gchild_exit)) { > > ++gchild_exit; > > ++handled; > > } else { > > @@ -215,7 +215,7 @@ proc_track(int sleep_time) > > } > > > > if (kevp->fflags & NOTE_FORK) { > > - if ((kevp->ident == pid) && (!child_fork)) { > > + if ((kevp->ident == (uintptr_t)pid) && (!child_fork)) { > > ++child_fork; > > ++handled; > > } else { > > @@ -273,7 +273,7 @@ event_trigger(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_disable(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_DISABLE)"; > > @@ -397,7 +397,7 @@ test_kevent_signal_oneshot(void) > > #endif > > > > void > > -test_evfilt_proc() > > +test_evfilt_proc(void) > > { > > kqfd = kqueue(); > > > > > > Modified: head/tests/sys/kqueue/libkqueue/read.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/read.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/read.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -18,7 +18,7 @@ > > > > #include "common.h" > > > > -int sockfd[2]; > > +static int sockfd[2]; > > > > static void > > kevent_socket_drain(void) > > @@ -40,7 +40,7 @@ kevent_socket_fill(void) > > } > > > > > > -void > > +static void > > test_kevent_socket_add(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_ADD)"; > > @@ -54,7 +54,7 @@ test_kevent_socket_add(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_socket_get(void) > > { > > const char *test_id = "kevent(EVFILT_READ) wait"; > > @@ -81,7 +81,7 @@ test_kevent_socket_get(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_socket_clear(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_CLEAR)"; > > @@ -115,7 +115,7 @@ test_kevent_socket_clear(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_socket_disable_and_enable(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_DISABLE)"; > > @@ -153,7 +153,7 @@ test_kevent_socket_disable_and_enable(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_socket_del(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_DELETE)"; > > @@ -172,7 +172,7 @@ test_kevent_socket_del(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_socket_oneshot(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_ONESHOT)"; > > @@ -207,7 +207,7 @@ test_kevent_socket_oneshot(void) > > > > > > #if HAVE_EV_DISPATCH > > -void > > +static void > > test_kevent_socket_dispatch(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_DISPATCH)"; > > @@ -242,7 +242,7 @@ test_kevent_socket_dispatch(void) > > #endif /* HAVE_EV_DISPATCH */ > > > > #if BROKEN > > -void > > +static void > > test_kevent_socket_lowat(void) > > { > > const char *test_id = "kevent(EVFILT_READ, NOTE_LOWAT)"; > > @@ -275,7 +275,7 @@ test_kevent_socket_lowat(void) > > } > > #endif > > > > -void > > +static void > > test_kevent_socket_eof(void) > > { > > const char *test_id = "kevent(EVFILT_READ, EV_EOF)"; > > @@ -304,7 +304,7 @@ test_kevent_socket_eof(void) > > } > > > > void > > -test_evfilt_read() > > +test_evfilt_read(void) > > { > > /* Create a connected pair of full-duplex sockets for testing socket events */ > > if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockfd) < 0) > > > > Modified: head/tests/sys/kqueue/libkqueue/signal.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/signal.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/signal.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -19,7 +19,7 @@ > > #include "common.h" > > > > > > -void > > +static void > > test_kevent_signal_add(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_ADD)"; > > @@ -34,7 +34,7 @@ test_kevent_signal_add(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_get(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, wait)"; > > @@ -62,7 +62,7 @@ test_kevent_signal_get(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_disable(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_DISABLE)"; > > @@ -88,7 +88,7 @@ test_kevent_signal_disable(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_enable(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_ENABLE)"; > > @@ -125,7 +125,7 @@ test_kevent_signal_enable(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_del(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_DELETE)"; > > @@ -151,7 +151,7 @@ test_kevent_signal_del(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_signal_oneshot(void) > > { > > const char *test_id = "kevent(EVFILT_SIGNAL, EV_ONESHOT)"; > > @@ -185,7 +185,7 @@ test_kevent_signal_oneshot(void) > > } > > > > void > > -test_evfilt_signal() > > +test_evfilt_signal(void) > > { > > kqfd = kqueue(); > > test_kevent_signal_add(); > > > > Modified: head/tests/sys/kqueue/libkqueue/timer.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/timer.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/timer.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -42,7 +42,7 @@ now(void) > > /* Sleep for a given number of milliseconds. The timeout is assumed to > > * be less than 1 second. > > */ > > -void > > +static void > > mssleep(int t) > > { > > struct timespec stime = { > > @@ -56,7 +56,7 @@ mssleep(int t) > > /* Sleep for a given number of microseconds. The timeout is assumed to > > * be less than 1 second. > > */ > > -void > > +static void > > ussleep(int t) > > { > > struct timespec stime = { > > @@ -67,7 +67,7 @@ ussleep(int t) > > nanosleep(&stime, NULL); > > } > > > > -void > > +static void > > test_kevent_timer_add(void) > > { > > const char *test_id = "kevent(EVFILT_TIMER, EV_ADD)"; > > @@ -82,7 +82,7 @@ test_kevent_timer_add(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_timer_del(void) > > { > > const char *test_id = "kevent(EVFILT_TIMER, EV_DELETE)"; > > @@ -99,7 +99,7 @@ test_kevent_timer_del(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_timer_get(void) > > { > > const char *test_id = "kevent(EVFILT_TIMER, wait)"; > > @@ -509,7 +509,7 @@ test_update_timing(void) > > } > > > > void > > -test_evfilt_timer() > > +test_evfilt_timer(void) > > { > > kqfd = kqueue(); > > test_kevent_timer_add(); > > > > Modified: head/tests/sys/kqueue/libkqueue/user.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/user.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/user.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -114,7 +114,7 @@ oneshot(void) > > } > > > > void > > -test_evfilt_user() > > +test_evfilt_user(void) > > { > > kqfd = kqueue(); > > > > > > Modified: head/tests/sys/kqueue/libkqueue/vnode.c > > ============================================================================== > > --- head/tests/sys/kqueue/libkqueue/vnode.c Sat Apr 18 12:54:40 2020 (r360072) > > +++ head/tests/sys/kqueue/libkqueue/vnode.c Sat Apr 18 12:54:47 2020 (r360073) > > @@ -20,7 +20,7 @@ > > > > int vnode_fd; > > > > -void > > +static void > > test_kevent_vnode_add(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, EV_ADD)"; > > @@ -44,7 +44,7 @@ test_kevent_vnode_add(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_note_delete(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, NOTE_DELETE)"; > > @@ -64,7 +64,7 @@ test_kevent_vnode_note_delete(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_note_write(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, NOTE_WRITE)"; > > @@ -88,7 +88,7 @@ test_kevent_vnode_note_write(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_note_attrib(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, NOTE_ATTRIB)"; > > @@ -107,7 +107,7 @@ test_kevent_vnode_note_attrib(void) > > nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); > > if (nfds < 1) > > err(1, "%s", test_id); > > - if (kev.ident != vnode_fd || > > + if (kev.ident != (uintptr_t)vnode_fd || > > kev.filter != EVFILT_VNODE || > > kev.fflags != NOTE_ATTRIB) > > err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)", > > @@ -116,7 +116,7 @@ test_kevent_vnode_note_attrib(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_note_rename(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, NOTE_RENAME)"; > > @@ -135,7 +135,7 @@ test_kevent_vnode_note_rename(void) > > nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); > > if (nfds < 1) > > err(1, "%s", test_id); > > - if (kev.ident != vnode_fd || > > + if (kev.ident != (uintptr_t)vnode_fd || > > kev.filter != EVFILT_VNODE || > > kev.fflags != NOTE_RENAME) > > err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)", > > @@ -147,7 +147,7 @@ test_kevent_vnode_note_rename(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_del(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, EV_DELETE)"; > > @@ -162,7 +162,7 @@ test_kevent_vnode_del(void) > > success(); > > } > > > > -void > > +static void > > test_kevent_vnode_disable_and_enable(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, EV_DISABLE and EV_ENABLE)"; > > @@ -195,7 +195,7 @@ test_kevent_vnode_disable_and_enable(void) > > nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); > > if (nfds < 1) > > err(1, "%s", test_id); > > - if (kev.ident != vnode_fd || > > + if (kev.ident != (uintptr_t)vnode_fd || > > kev.filter != EVFILT_VNODE || > > kev.fflags != NOTE_ATTRIB) > > err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)", > > @@ -205,7 +205,7 @@ test_kevent_vnode_disable_and_enable(void) > > } > > > > #if HAVE_EV_DISPATCH > > -void > > +static void > > test_kevent_vnode_dispatch(void) > > { > > const char *test_id = "kevent(EVFILT_VNODE, EV_DISPATCH)"; > > @@ -226,7 +226,7 @@ test_kevent_vnode_dispatch(void) > > nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); > > if (nfds < 1) > > err(1, "%s", test_id); > > - if (kev.ident != vnode_fd || > > + if (kev.ident != (uintptr_t)vnode_fd || > > kev.filter != EVFILT_VNODE || > > kev.fflags != NOTE_ATTRIB) > > err(1, "%s - incorrect event (sig=%u; filt=%d; flags=%d)", > > @@ -248,7 +248,7 @@ test_kevent_vnode_dispatch(void) > > #endif /* HAVE_EV_DISPATCH */ > > > > void > > -test_evfilt_vnode() > > +test_evfilt_vnode(void) > > { > > kqfd = kqueue(); > > test_kevent_vnode_add();