[sane-devel] hs2p backend

jazz_johnson at verizon.net jazz_johnson at verizon.net
Mon Nov 19 04:08:47 UTC 2007


On Saturday 17 November 2007, m. allan noah wrote:
> ok, i've used your patch to add the backend into my local tree and
> build it. it does build, but it gives quite a few warnings. my current
> system is 64 bit, hence some of these might appear new to you.
>
> Others are C90/C99 issues, which should be fixed, because they will
> bite us on some of SANE's older platforms. It would be nice to comment
> out all the unused vars as well, since they tend to obscure real
> problems. please see the attached log.
>
> if you can clone your patched cvs tree, and make your changes in the
> clone, then pull a patch between the two copies, it will be easier for
> me to apply this on top of what i've already done.
>
> thanks.
>
> allan


OK,
I've removed most unused local variables.
I've attached a compile log "make.log" which includes the following warnings 
on my PentiumIII x86 platform:

In file included from hs2p.c:95:
hs2p-scsi.c: In function 'sense_handler':
hs2p-scsi.c:382: warning: unused parameter 'arg'
hs2p.c: At top level:
hs2p-scsi.h:733: warning: 'compression_types' defined but not used
hs2p-scsi.h:747: warning: 'compression_argument' defined but not used
hs2p.h:320: warning: '_is_host_little_endian' defined but not used
hs2p-scsi.c:326: warning: 'request_sense' defined but not used
hs2p-scsi.c:734: warning: 'vpd_indentifier_00H' defined but not used
hs2p-scsi.c:749: warning: 'vpd_identifier_C0H' defined but not used
hs2p-scsi.c:1113: warning: 'send_data' defined but not used
hs2p-scsi.c:1220: warning: 'clear_maintenance_data' defined but not used
hs2p-scsi.c:1288: warning: 'read_halftone_mask' defined but not used
hs2p-scsi.c:1346: warning: 'set_halftone_mask' defined but not used
hs2p-scsi.c:1601: warning: 'receive_diagnostic' defined but not used
hs2p-scsi.c:1625: warning: 'send_diagnostic' defined but not used
hs2p-scsi.c:1929: warning: 'lamp_timer' defined but not used
hs2p.c:123: warning: 'allblank' defined but not used
hs2p.c:1528: warning: 'get_scan_mode_id' defined but not used



As you can see, there's still one unused parameter in sense_handler(..., void *arg) definition
and there's a bunch of hs2p scsi commands for which I wrote functions but have not used
in the main hs2p backend. I also defined some structs for hs2p compression types which I've
also not used.

As you requested I cloned the clean patched cvs tree, copied my new hs2p files to it,
and made a new patch against that:

BLD=sane-backends-1.0.18
OLD=sane-backends-hs2p
NEW=sane-backends-hs2p-new

#cp -a $OLD $NEW
#cp $BLD/backend/{hs2p*.c, hs2p*.h} $NEW/backend/
#diff -r -N -u $OLD $NEW | gzip -c - >hs2p_patch_new.gz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: text/x-log
Size: 5865 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20071118/ba57b1b1/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hs2p_patch_new.gz
Type: application/x-gzip
Size: 3502 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20071118/ba57b1b1/attachment-0001.bin 


More information about the sane-devel mailing list