Bruce Korb wrote:
> @@ -193,7 +197,7 @@ call_argtype_function (struct printf_inf
> 
>    else
>      {
> -      pinfo->spec = *(unsigned char *) pinfo->format;
> +      pinfo->spec = (unsigned)*(pinfo->format);
>        pinfo->extra = spec->user;
>        pinfo->type = spec->type;

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

         pinfo->spec = * pinfo->format;

You need to case a 'char' to 'unsigned char' only
  - when using them as array indices,
  - when passing them to <ctype.h> functions,
  - when comparing them to values obtained through getc() or fgetc().

Bruno



Reply via email to