lib: fix clang build warnings