--- hplip-2.7.6/scan/sane/pml.c.14charsign 2007-07-22 00:21:18.000000000 +0800 +++ hplip-2.7.6/scan/sane/pml.c 2007-07-22 00:26:22.000000000 +0800 @@ -228,7 +228,7 @@ int maxlen ) { int type, len; - unsigned char prefix[2]; + char prefix[2]; if( PmlGetPrefixValue( obj, &type, 0, 0, 0, 0 ) == ERROR ) { @@ -242,7 +242,8 @@ } if( pSymbolSet ) { - *pSymbolSet = ( ( prefix[0] << 8 ) | prefix[1] ); + *pSymbolSet = ( ( (unsigned char)prefix[0] << 8 ) | + (unsigned char)prefix[1] ); } return len; @@ -251,7 +252,7 @@ int __attribute__ ((visibility ("hidden"))) PmlGetIntegerValue( PmlObject_t obj, int * pType, int * pValue ) { int type; - unsigned char svalue[sizeof( int )]; + char svalue[sizeof( int )]; int accum = 0, i, len; if( !pType ) @@ -267,7 +268,7 @@ for( i = 0; i < len; i++ ) { - accum = ( ( accum << 8 ) | ( svalue[i] & 0xFF ) ); + accum = ( ( accum << 8 ) | ( (unsigned char)svalue[i] ) ); } if( pValue ) { @@ -348,7 +349,7 @@ int __attribute__ ((visibility ("hidden"))) PmlRequestGet( int deviceid, int channelid, PmlObject_t obj ) { - unsigned char data[PML_MAX_DATALEN]; + char data[PML_MAX_DATALEN]; int datalen=0, stat=ERROR, type, pml_result; enum HPMUD_RESULT result; @@ -358,7 +359,7 @@ if (result == HPMUD_R_OK) { - PmlSetValue(obj, type, (char *)data, datalen); + PmlSetValue(obj, type, data, datalen); stat = OK; } --- hplip-2.7.6/scan/sane/scl.c.14charsign 2007-07-22 00:26:32.000000000 +0800 +++ hplip-2.7.6/scan/sane/scl.c 2007-07-22 00:28:07.000000000 +0800 @@ -36,10 +36,11 @@ #define DEBUG_DECLARE_ONLY #include "sanei_debug.h" -static int SclBufferIsPartialReply( unsigned char * data, int datalen ) +static int SclBufferIsPartialReply( void * dataptr, int datalen ) { int i = 0, value = 0; - unsigned char d; + unsigned char * const data = dataptr; + unsigned int d; if( i >= datalen ) { --- hplip-2.7.6/ip/xpnm.c.14charsign 2007-07-22 00:28:28.000000000 +0800 +++ hplip-2.7.6/ip/xpnm.c 2007-07-22 00:28:46.000000000 +0800 @@ -422,7 +422,7 @@ *pdwInputNextPos = g->dwInNextPos; *pdwOutputThisPos = g->dwOutNextPos; if (g->fIsEncode && !g->fDidHeader) { - BYTE buffer[MAX_ENCODE_HEADER_SIZE]; + char buffer[MAX_ENCODE_HEADER_SIZE]; DWORD maxval=(2<<((g->traits.iBitsPerPixel/ g->traits.iComponentsPerPixel)-1))-1; int len;