[sane-devel] New magicolor backend for inclusion in git

m. allan noah kitno455 at gmail.com
Thu Jan 20 20:26:42 UTC 2011


What if you make the pointer unsigned char instead?

allan

On Thu, Jan 20, 2011 at 3:20 PM, Reinhold Kainhofer
<reinhold at kainhofer.com> wrote:
> Am Donnerstag, 20. Januar 2011, um 18:13:09 schrieb Adrian Glaubitz:
>> Hi Allan,
>>
>> On Jan 20, 2011, at 6:00 PM, m. allan noah wrote:
>> > Hmm- looks like *p1 should not be void ptr. Try this change:
>> >
>> > sane-backends/backend/magicolor.c line 672
>> >    void *p1;
>> > should be
>> >    unsigned char * p1;
>> > perhaps?
>>
>> Indeed, that fixes the problem along with a second change in the same
>> backend. I generated a patch so you can see what I actually changed.
>
> It fixes the error, but still adds a compiler warning about signedness...
> I'm currently really thinking of getting rid of those htole32a calls and
> instead simply copying over all four bytes (in little endian) manually.
>
> Cheers,
> Reinhold
>
> --
> ------------------------------------------------------------------
> Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
>  * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
>  * http://www.fam.tuwien.ac.at/, DVR: 0005886
>  * LilyPond, Music typesetting, http://www.lilypond.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list