Bruno Haible wrote: > The cast is a no-op anyway. Since pinfo->format is of type 'const char *' > and pinfo->spec is of type 'char', both variants are equivalent to
I guess it is a preference issue: I like to remember as few special cases as absolutely possible. There's too much to remember as it is. "Never dereference a cast pointer" is simple. "never dereference a cast unless you are only changing fundamental type attributes" is just that much more complexity. Besides, it is the original way it was written. > You need to cast a 'char' to 'unsigned char' only > - when using them as array indices, > - when passing them to <ctype.h> functions, Actually, you have to cast to "int" or "unsigned int" because you will otherwise get warnings about using char values as an index on Solaris. Poor design of the ctype stuff - either way. :( Cheers -Bruce