]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dir-watch-kqueue: Silence -Wshadow warning
authorAlex Richardson <arichardson.kde@gmail.com>
Sun, 15 May 2022 10:34:48 +0000 (11:34 +0100)
committerAlex Richardson <arichardson.kde@gmail.com>
Sun, 15 May 2022 10:35:35 +0000 (11:35 +0100)
This should be the last warning that is preventing us from using -Werror
for FreeBSD builds.

bus/dir-watch-kqueue.c

index 15519fcb5af06987f866e477d2214e2d99706f43..a4ed7ca58955013c5bbac19094fc952d87588166 100644 (file)
@@ -51,7 +51,7 @@ static DBusWatch *watch = NULL;
 static DBusLoop *loop = NULL;
 
 static dbus_bool_t
-_handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data)
+_handle_kqueue_watch (DBusWatch *_watch, unsigned int flags, void *data)
 {
   struct kevent ev;
   struct timespec nullts = { 0, 0 };
@@ -73,6 +73,7 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data)
   else if (res < 0 && errno == EBADF)
     {
       kq = -1;
+      _dbus_assert (watch == _watch);
       if (watch != NULL)
         {
           _dbus_loop_remove_watch (loop, watch);