Come on, this behaviour is there for a good reason.which do not allow implicit conversion of 'const char *' to 'char *'
Considering grfcodec contains its own implementation of basename, which doesn't modify its argument, why not modify its signature accordingly (to a const char*, since that corresponds to how the function works), rather than casting the const away?