To reproduce:
$ /usr/bin/find /bin /nonexistent -ls > /dev/null
find: /nonexistent: Undefined error: 0
$ /usr/bin/find /bin /nonexistent > /dev/null
find: /nonexistent: Operation not supported by device
$ uname -mrsv
OpenBSD 5.6 GENERIC#2 i386
$
Here is a patch:
--- usr.bin/find/find.c.old Tue Jan 3 00:19:45 2012
+++ usr.bin/find/find.c Sun Nov 30 23:41:43 2014
@@ -180,7 +180,7 @@ find_execute(PLAN *plan, /* search plan */
case FTS_ERR:
case FTS_NS:
(void)fflush(stdout);
- warn("%s", entry->fts_path);
+ warnc(entry->fts_errno, "%s", entry->fts_path);
rval = 1;
continue;
}