add default cases to switch statements to suppress -Wswitch warnings with clang
fix format specifier in printf (%zd instead of %d)