[sane-devel] sane-backends master e13b80fa -- odd looking sprintf format strings
paddy-hack at member.fsf.org
Wed May 15 10:25:20 BST 2019
Robert A. Schmied writes:
> i fetched a static copy of sane-backends master e13b80fa yesterday
> and find in sanei/sanei_scsi.c these 4 odd looking sprintf format strings
> (well actually 3 sprintf format strings and one comment at line 3211)
> 968: DBG (1, "sanei_scsi_open: device name `%sÂ´ is not valid: %s\n",
> 1159: DBG (1, "sanei_scsi_open: can't open device `%sÂ´: %s\n", dev,
> 1173: DBG (1, "sanei_scsi_open: device name `%sÂ´ is not valid: %s\n",
> 3211: xxxxxx huh? ShouldnÂ´t the above line have been src_size - cdb_size)
> note `%sÂ´ or nÂ´t
> don't know if this is real bad, just bad or a don't care,
This is not any of your options ;-) It is both correct and intended.
Please note that *all* files are UTF-8 encoded. You're probably seeing
this because your editor/pager uses one of the ISO-8859-* encodings.
The lines you quote above were changed in fc4b250a0. You can check with
git show fc4b250a0 -- sanei/sanei_scsi.c
BTW, your line numbers differ. I assume you made some changes.
> as i'm still
> patching in my source hacks to get a clean compile and link on solaris 10
> sparc with the sun version of usb.h/libusb (no libusb*.pc file but with
> /usr/sfw/bin/libusb-config --version that reports 0.1.7) and old gcc 4.9.
# Merge request is welcome :-)
> i've ggrepped around and find no other sane-backends files with this Â character.
I don't know exactly what state of your git repository you grepped, nor
do I know how your grep handles encodings, but I would expect you to see
this on a clean checkout of e13b80fa in a fair number of files. As an
example, line 16 of backend/plustek-pp_process.h (the one that mentions
version 0.35) should have one right after "Kevin".
# Is `ggrep` a typo or an alias for `git grep`? I believe `git grep`
# uses the locale's encoding.
Hope this helps,
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
More information about the sane-devel