[sane-devel] Fix for backend/epson.c

Henning Meier-Geinitz henning at meier-geinitz.de
Sun Dec 8 11:13:08 GMT 2002


Hi,

On Sun, Dec 08, 2002 at 11:49:22AM +0100, Aurelien Jarno wrote:
> In backend/epson.c, lines 823 and 905, there is the following code:
> 
>      const u_char * s = buf;
> 
>      for( k = 0; k < buf_size; k++) {
>        DBG( 125, "buf[%u] %02x %c\n", k, s[k], isprint( s[k]) ? s[k] : '.');
> 
> The second argument passed to DBG, s[k], is a char, but the compiler is
> tell to read an int. It seems to work in most case, but it mail fail on
> some architectures.

Really? %x (or %u, %d etc) with a char argument is used in a lot more
places in SANE.

> +                       DBG( 125, "buf[%u] %02hhx %c\n", k, s[ k],
>                                         isprint( s[ k]) ? s[ k] : '.');



More information about the sane-devel mailing list