]> Creatis software - gdcm.git/blobdiff - src/gdcmjasper/src/libjasper/base/jas_image.c
ENH: Ok since OJ warnings are not going to be fixed anytime soon remove them
[gdcm.git] / src / gdcmjasper / src / libjasper / base / jas_image.c
index 38743fdc85e5fc10972649bbe3b4eb9247f88cf2..922bd0b431de8279c78b52bc145eae8742fadd5f 100644 (file)
@@ -64,7 +64,7 @@
 /*
  * Image Library
  *
- * $Id: jas_image.c,v 1.1 2005/05/22 18:32:59 malaterre Exp $
+ * $Id: jas_image.c,v 1.5 2005/07/01 13:17:00 malaterre Exp $
  */
 
 /******************************************************************************\
@@ -279,7 +279,7 @@ static jas_image_cmpt_t *jas_image_cmpt_copy(jas_image_cmpt_t *cmpt)
   return newcmpt;
 }
 
-void jas_image_destroy(jas_image_t *image)
+JASGLOBAL(void) jas_image_destroy(jas_image_t *image)
 {
   int i;
 
@@ -302,7 +302,8 @@ static jas_image_cmpt_t *jas_image_cmpt_create(uint_fast32_t tlx, uint_fast32_t
   jas_image_cmpt_t *cmpt;
   long size;
 
-  if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) {
+  /*if (!(cmpt = jas_malloc(sizeof(jas_image_cmpt_t)))) {*/
+  if (!(cmpt = jas_image_cmpt_create0())) {
     return 0;
   }
 
@@ -348,7 +349,7 @@ static void jas_image_cmpt_destroy(jas_image_cmpt_t *cmpt)
 * Load and save operations.
 \******************************************************************************/
 
-jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, char *optstr)
+JASGLOBAL(jas_image_t) *jas_image_decode(jas_stream_t *in, int fmt, char *optstr)
 {
   jas_image_fmtinfo_t *fmtinfo;
   jas_image_t *image;
@@ -510,7 +511,7 @@ int jas_image_writecmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas
 * File format operations.
 \******************************************************************************/
 
-void jas_image_clearfmts()
+JASGLOBAL(void) jas_image_clearfmts()
 {
   int i;
   jas_image_fmtinfo_t *fmtinfo;
@@ -568,7 +569,7 @@ int jas_image_strtofmt(char *name)
   return fmtinfo->id;
 }
 
-char *jas_image_fmttostr(int fmt)
+JASGLOBAL(char) *jas_image_fmttostr(int fmt)
 {
   jas_image_fmtinfo_t *fmtinfo;
   if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) {
@@ -577,7 +578,7 @@ char *jas_image_fmttostr(int fmt)
   return fmtinfo->name;
 }
 
-int jas_image_getfmt(jas_stream_t *in)
+JASGLOBAL(int) jas_image_getfmt(jas_stream_t *in)
 {
   jas_image_fmtinfo_t *fmtinfo;
   int found;
@@ -623,7 +624,7 @@ int jas_image_fmtfromname(char *name)
 * Miscellaneous operations.
 \******************************************************************************/
 
-uint_fast32_t jas_image_rawsize(jas_image_t *image)
+JASGLOBAL(uint_fast32_t) jas_image_rawsize(jas_image_t *image)
 {
   uint_fast32_t rawsize;
   int cmptno;
@@ -884,7 +885,7 @@ int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents,
   return 0;
 }
 
-int jas_image_readcmptsample(jas_image_t *image, int cmptno, int x, int y)
+JASGLOBAL(int) jas_image_readcmptsample(jas_image_t *image, int cmptno, int x, int y)
 {
   jas_image_cmpt_t *cmpt;
   uint_fast32_t v;
@@ -1339,6 +1340,8 @@ jas_image_dump(image, stderr);
   numoutclrchans = jas_clrspc_numchans(jas_cmprof_clrspc(outprof));
   numoutauxchans = 0;
   numoutchans = numoutclrchans + numoutauxchans;
+  (void)numoutchans;/*  'numoutchans' is assigned a value that is never used in function jas_image_chclrspc*/
+  (void)numinauxchans; /* 'numinauxchans' is assigned a value that is never used in function jas_image_chclrspc*/
   prec = 8;
 
   if (!(outimage = jas_image_create0()))