If you check the type, it's of type uintptr_t
which is a standard type big enough to hold both the largest integer or a pointer. This is so it can be used on any kind of type which can easily be casted as an integer. And from the FreeBSD kqueue manual page:
Value used to identify this event. The exact interpretation is determined by the attached filter, but often is a file descriptor.
So I would definitely say it's by design.
If you want to get rid of the warning, I suggest yo cast the socket:
ev.ident == static_cast<uintptr_t>(sock)