[sldev] [VWR] OpenJPEG backtraces (Robin Cornelius)

Robin Cornelius robin.cornelius at gmail.com
Sat Sep 22 10:01:15 PDT 2007


Argent Stonecutter wrote:

> 
> Anyway, I think the maximally portable code is this:
> 
> (int *)( (char *)m + ( 16 - ((unsigned)m % 16) ) % 16 )
> 
> You could explicitly mask here but any compiler that doesn't produce the 
> same code for (uns % 16) and (uns & 0xF) has problems.
> 

Well gcc had a warn (but i think you expected this as you had a known 
truncation that is not important)

libopenjpeg/dwt.c: In function 'dwt_decode_tile':
libopenjpeg/dwt.c:623: warning: cast from pointer to integer of 
different siz

But it seems ok running, so far.

All in all this seems to have fixed the worst 64 bit bug now so a 64 bit 
build with 100% open source libs is quite quite usable.

We should really push this upstream to openjpeg source. Should i do this 
or will Callum Lerwick "OpenJPEG Czar of the Second Life Open Source 
Enforcement Agency" take this one?


Robin




More information about the SLDev mailing list