[gdal-dev] jpeg2000/jasper error compiling gdal 2.1 from git release branch

Donovan Cameron sault.don at gmail.com
Wed Dec 7 10:43:24 PST 2016


Awesome, patch works as expected and gdal builds against the latest jasper.

Thanks a lot.

diff --git a/frmts/jpeg2000/jpeg2000_vsil_io.cpp 
b/frmts/jpeg2000/jpeg2000_vsil_io.cpp index 74f1e64..3a948d0 100644 --- 
a/frmts/jpeg2000/jpeg2000_vsil_io.cpp +++ 
b/frmts/jpeg2000/jpeg2000_vsil_io.cpp @@ -209,7 +209,7 @@ static void 
JPEG2000_VSIL_jas_stream_initbuf(jas_stream_t *stream, int bufmode, /* 
The buffer must be large enough to accommodate maximum putback. */ 
assert(bufsize > JAS_STREAM_MAXPUTBACK); - stream->bufbase_ = 
JAS_CAST(uchar *, buf); + stream->bufbase_ = JAS_CAST(unsigned char*, 
buf); stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK; } } else {


On 07/12/16 11:22 AM, Even Rouault wrote:
>
> On mercredi 7 décembre 2016 11:19:11 CET Donovan Cameron wrote:
>
> > On 07/12/16 10:41 AM, Even Rouault wrote:
>
> > > You could as well replace the JAS_CAST(uchar *, buf); by
>
> > > JAS_CAST(unsigned char*, buf)
>
> >
>
> > Thanks Even, that's helpful.
>
> >
>
> > Whereabouts would I try to make this patch? Not sure what file to look
>
> > for to do this. Sorry!
>
> frmts/jpeg2000/jpeg2000_vsil_io.cpp, line 212
>
> -- 
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>

-- 
Kind regards,

Donovan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161207/16dc2dcf/attachment.html>


More information about the gdal-dev mailing list