Switch to -std=c11, -pedantic and fix warnings.