Simplify warnings code for clang