Added compilation flag and fixed GCC warnings