updated for clang
updated for C11 warning