On Mon, Sep 28, 2015 at 7:04 AM, Johannes Meixner <jsm...@suse.de> wrote: > > Hello, > > On Sep 28 18:59 Olaf Meeuwissen wrote (excerpt): >> >> With the sequencing issues, we can only speculate at what >> the intended behaviour is, so we can't really fix things. >> That notwithstanding, I think we can make a decent, educated >> guess at a fix for both cases and make the warning go away :-| > > > I don't know if the following sequencing bug was already found: > > In sane-backends-git20150928 in backend/microtek2.c > there is line 7456: > > ms->buf.current_src = ++ms->buf.current_src % 2; > > My "decent educated guess" is that > > ++ms->buf.current_src; > ms->buf.current_src = ms->buf.current_src % 2; > > is meant.
I'd guess it is just trying to swap 0 and 1, since all it is used for is an index into ms->buf.src_buffer, which is defined as: uint8_t *src_buffer[2]; /* two buffers because of CCD gap */ So all the code should do is: ms->buf.current_src = ! ms->buf.current_src; allan -- "well, I stand up next to a mountain- and I chop it down with the edge of my hand" -- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org