Clang 3.7.0 (trunk) gives this warning about amd64's trap_fatal():
sys/amd64/amd64/trap.c:846:42: error: address of array '(__curthread())->td_name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] (u_long)curproc->p_pid, curthread->td_name ? ~~~~~~~~~~~^~~~~~~ ~
Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed.
Note that I'm assuming curthread itself will never be NULL at this
point. If that is a possibility, the check could be changed into:
curthread ? curthread->td_name : ""
or something similar.