summaryrefslogtreecommitdiff
path: root/libtiff/tif_ojpeg.c
diff options
context:
space:
mode:
authorAdam Goode <adam@spicenitz.org>2020-03-08 00:51:28 +0100
committerThomas Bernard <miniupnp@free.fr>2020-03-08 00:51:28 +0100
commit63c666344fe6b8e28e27f69b5b0fd156ded40b14 (patch)
tree10e6ca2c52f1fb4b9a9b2e6977adcf06f5056eda /libtiff/tif_ojpeg.c
parente95584d3b87b9257e594f4cf0cb7482bdc9af3f4 (diff)
downloadlibtiff-git-63c666344fe6b8e28e27f69b5b0fd156ded40b14.tar.gz
Make pointers returned via TIFFGetField const
According to http://bugzilla.maptools.org/show_bug.cgi?id=2125#c6 callers are not allowed to modify pointer or array values returned from TIFFGetField or the like. So, make this explicit in the documentation by specifying these things as const. Note that this is not an ABI change, since C does not encode const in libraries. Also, this is not really an API change, since the varargs call strips away all the types anyway. So it really is more of a documentation change. fixes #11
Diffstat (limited to 'libtiff/tif_ojpeg.c')
-rw-r--r--libtiff/tif_ojpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c
index aa5ff5e2..e2c9c4f9 100644
--- a/libtiff/tif_ojpeg.c
+++ b/libtiff/tif_ojpeg.c
@@ -498,15 +498,15 @@ OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap)
break;
case TIFFTAG_JPEGQTABLES:
*va_arg(ap,uint32*)=(uint32)sp->qtable_offset_count;
- *va_arg(ap,void**)=(void*)sp->qtable_offset;
+ *va_arg(ap,const void**)=(const void*)sp->qtable_offset;
break;
case TIFFTAG_JPEGDCTABLES:
*va_arg(ap,uint32*)=(uint32)sp->dctable_offset_count;
- *va_arg(ap,void**)=(void*)sp->dctable_offset;
+ *va_arg(ap,const void**)=(const void*)sp->dctable_offset;
break;
case TIFFTAG_JPEGACTABLES:
*va_arg(ap,uint32*)=(uint32)sp->actable_offset_count;
- *va_arg(ap,void**)=(void*)sp->actable_offset;
+ *va_arg(ap,const void**)=(const void*)sp->actable_offset;
break;
case TIFFTAG_JPEGPROC:
*va_arg(ap,uint16*)=(uint16)sp->jpeg_proc;