Remove warnings

First commit removes warning when assigning from `const char*` argument to `char*` local variable.

Second replaces old signatures of error reporting routines by a new ones that accepts arbitrary number of arguments. This makes it more flexible and allows to avoid one "ugly" way of passing number in scanflags.c