Fix various warnings found by -Wall (mainly linked to functions with variadic arguments)