]> Creatis software - gdcm.git/commitdiff
COMP: Painfully (re)fix all the warnings when compiled with -W -Wall
authormalaterre <malaterre>
Thu, 14 Oct 2004 04:21:45 +0000 (04:21 +0000)
committermalaterre <malaterre>
Thu, 14 Oct 2004 04:21:45 +0000 (04:21 +0000)
24 files changed:
src/jpeg/libijg/jccoefct.c
src/jpeg/libijg/jccolor.c
src/jpeg/libijg/jcdiffct.c
src/jpeg/libijg/jclhuff.c
src/jpeg/libijg/jcmainct.c
src/jpeg/libijg/jcmarker.c
src/jpeg/libijg/jcpred.c
src/jpeg/libijg/jcsample.c
src/jpeg/libijg/jcscale.c
src/jpeg/libijg/jcshuff.c
src/jpeg/libijg/jctrans.c
src/jpeg/libijg/jdatasrc.c
src/jpeg/libijg/jdcoefct.c
src/jpeg/libijg/jdcolor.c
src/jpeg/libijg/jddiffct.c
src/jpeg/libijg/jdmainct.c
src/jpeg/libijg/jdmerge.c
src/jpeg/libijg/jdpostct.c
src/jpeg/libijg/jdpred.c
src/jpeg/libijg/jdsample.c
src/jpeg/libijg/jdscale.c
src/jpeg/libijg/jmemnobs.c
src/jpeg/libijg/jquant1.c
src/jpeg/libijg/jquant2.c

index 453df1ae8604221782621e9da5861baa31912c81..cad73c87bb9e3cdb2c0f40e780c0c48c49c8e77d 100644 (file)
@@ -351,6 +351,7 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
   JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
   JBLOCKROW buffer_ptr;
   jpeg_component_info *compptr;
+  (void)input_buf;
 
   /* Align the virtual buffers for the components used in this scan.
    * NB: during first pass, this is safe only because the buffers will
index e448d547480a91e0b89c8781bd297e1e8bbe2761..a0afd61bb3de1b57c7dc004da8e5dd25879a7ba9 100644 (file)
@@ -340,6 +340,7 @@ null_convert (j_compress_ptr cinfo,
 METHODDEF(void)
 null_method (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work needed */
 }
 
index 4505f495185321e5cc8e355577fe4f18584ce8ff..d3953425c259f936c862c1205137d2c738d26b20 100644 (file)
@@ -309,6 +309,7 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
   int comp, ci /* , yoffset */ ;
   JSAMPARRAY buffer[MAX_COMPONENTS];
   jpeg_component_info *compptr;
+  (void)input_buf;
 
   /* Align the virtual buffers for the components used in this scan.
    * NB: during first pass, this is safe only because the buffers will
index 6f2a2f1991e6449c1359b4ccfd385040a05a4fa4..a553ccee4ad48f48dab7fbe3ef10d2d18f3a3fd0 100644 (file)
@@ -569,6 +569,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
index 64b51dea50d94b254452f608492a345846e32fd4..e0cd678a1973884d14ea7bab7e8c51a62cef5037 100644 (file)
@@ -68,32 +68,32 @@ METHODDEF(void) process_data_buffer_main
 METHODDEF(void)
 start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
 
   /* Do nothing in raw-data mode. */
   if (cinfo->raw_data_in)
     return;
 
-  main->cur_iMCU_row = 0;  /* initialize counters */
-  main->rowgroup_ctr = 0;
-  main->suspended = FALSE;
-  main->pass_mode = pass_mode;  /* save mode for use by process_data */
+  mainPtr->cur_iMCU_row = 0;  /* initialize counters */
+  mainPtr->rowgroup_ctr = 0;
+  mainPtr->suspended = FALSE;
+  mainPtr->pass_mode = pass_mode;  /* save mode for use by process_data */
 
   switch (pass_mode) {
   case JBUF_PASS_THRU:
 #ifdef FULL_MAIN_BUFFER_SUPPORTED
-    if (main->whole_image[0] != NULL)
+    if (mainPtr->whole_image[0] != NULL)
       ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
 #endif
-    main->pub.process_data = process_data_simple_main;
+    mainPtr->pub.process_data = process_data_simple_main;
     break;
 #ifdef FULL_MAIN_BUFFER_SUPPORTED
   case JBUF_SAVE_SOURCE:
   case JBUF_CRANK_DEST:
   case JBUF_SAVE_AND_PASS:
-    if (main->whole_image[0] == NULL)
+    if (mainPtr->whole_image[0] == NULL)
       ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
-    main->pub.process_data = process_data_buffer_main;
+    mainPtr->pub.process_data = process_data_buffer_main;
     break;
 #endif
   default:
@@ -114,47 +114,47 @@ process_data_simple_main (j_compress_ptr cinfo,
         JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
         JDIMENSION in_rows_avail)
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   JDIMENSION data_unit = (JDIMENSION)(cinfo->data_unit);
 
-  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+  while (mainPtr->cur_iMCU_row < cinfo->total_iMCU_rows) {
     /* Read input data if we haven't filled the main buffer yet */
-    if (main->rowgroup_ctr < data_unit)
+    if (mainPtr->rowgroup_ctr < data_unit)
       (*cinfo->prep->pre_process_data) (cinfo,
           input_buf, in_row_ctr, in_rows_avail,
-          main->buffer, &main->rowgroup_ctr,
+          mainPtr->buffer, &mainPtr->rowgroup_ctr,
           (JDIMENSION) data_unit);
 
     /* If we don't have a full iMCU row buffered, return to application for
      * more data.  Note that preprocessor will always pad to fill the iMCU row
      * at the bottom of the image.
      */
-    if (main->rowgroup_ctr != data_unit)
+    if (mainPtr->rowgroup_ctr != data_unit)
       return;
 
     /* Send the completed row to the compressor */
-    if (! (*cinfo->codec->compress_data) (cinfo, main->buffer)) {
+    if (! (*cinfo->codec->compress_data) (cinfo, mainPtr->buffer)) {
       /* If compressor did not consume the whole row, then we must need to
        * suspend processing and return to the application.  In this situation
        * we pretend we didn't yet consume the last input row; otherwise, if
        * it happened to be the last row of the image, the application would
        * think we were done.
        */
-      if (! main->suspended) {
+      if (! mainPtr->suspended) {
   (*in_row_ctr)--;
-  main->suspended = TRUE;
+  mainPtr->suspended = TRUE;
       }
       return;
     }
     /* We did finish the row.  Undo our little suspension hack if a previous
      * call suspended; then mark the main buffer empty.
      */
-    if (main->suspended) {
+    if (mainPtr->suspended) {
       (*in_row_ctr)++;
-      main->suspended = FALSE;
+      mainPtr->suspended = FALSE;
     }
-    main->rowgroup_ctr = 0;
-    main->cur_iMCU_row++;
+    mainPtr->rowgroup_ctr = 0;
+    mainPtr->cur_iMCU_row++;
   }
 }
 
@@ -174,23 +174,23 @@ process_data_buffer_main (j_compress_ptr cinfo,
   my_main_ptr main = (my_main_ptr) cinfo->main;
   int ci;
   jpeg_component_info *compptr;
-  boolean writing = (main->pass_mode != JBUF_CRANK_DEST);
+  boolean writing = (mainPtr->pass_mode != JBUF_CRANK_DEST);
   JDIMENSION data_unit = (JDIMENSION)(cinfo->data_unit);
 
-  while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {
+  while (mainPtr->cur_iMCU_row < cinfo->total_iMCU_rows) {
     /* Realign the virtual buffers if at the start of an iMCU row. */
-    if (main->rowgroup_ctr == 0) {
+    if (mainPtr->rowgroup_ctr == 0) {
       for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
      ci++, compptr++) {
-  main->buffer[ci] = (*cinfo->mem->access_virt_sarray)
-    ((j_common_ptr) cinfo, main->whole_image[ci],
-     main->cur_iMCU_row * (compptr->v_samp_factor * data_unit),
+  mainPtr->buffer[ci] = (*cinfo->mem->access_virt_sarray)
+    ((j_common_ptr) cinfo, mainPtr->whole_image[ci],
+     mainPtr->cur_iMCU_row * (compptr->v_samp_factor * data_unit),
      (JDIMENSION) (compptr->v_samp_factor * data_unit), writing);
       }
       /* In a read pass, pretend we just read some source data. */
       if (! writing) {
   *in_row_ctr += cinfo->max_v_samp_factor * data_unit;
-  main->rowgroup_ctr = data_unit;
+  mainPtr->rowgroup_ctr = data_unit;
       }
     }
 
@@ -199,40 +199,40 @@ process_data_buffer_main (j_compress_ptr cinfo,
     if (writing) {
       (*cinfo->prep->pre_process_data) (cinfo,
           input_buf, in_row_ctr, in_rows_avail,
-          main->buffer, &main->rowgroup_ctr,
+          mainPtr->buffer, &mainPtr->rowgroup_ctr,
           (JDIMENSION) data_unit);
       /* Return to application if we need more data to fill the iMCU row. */
-      if (main->rowgroup_ctr < data_unit)
+      if (mainPtr->rowgroup_ctr < data_unit)
   return;
     }
 
     /* Emit data, unless this is a sink-only pass. */
-    if (main->pass_mode != JBUF_SAVE_SOURCE) {
-      if (! (*cinfo->codec->compress_data) (cinfo, main->buffer)) {
+    if (mainPtr->pass_mode != JBUF_SAVE_SOURCE) {
+      if (! (*cinfo->codec->compress_data) (cinfo, mainPtr->buffer)) {
   /* If compressor did not consume the whole row, then we must need to
    * suspend processing and return to the application.  In this situation
    * we pretend we didn't yet consume the last input row; otherwise, if
    * it happened to be the last row of the image, the application would
    * think we were done.
    */
-  if (! main->suspended) {
+  if (! mainPtr->suspended) {
     (*in_row_ctr)--;
-    main->suspended = TRUE;
+    mainPtr->suspended = TRUE;
   }
   return;
       }
       /* We did finish the row.  Undo our little suspension hack if a previous
        * call suspended; then mark the main buffer empty.
        */
-      if (main->suspended) {
+      if (mainPtr->suspended) {
   (*in_row_ctr)++;
-  main->suspended = FALSE;
+  mainPtr->suspended = FALSE;
       }
     }
 
     /* If get here, we are done with this iMCU row.  Mark buffer empty. */
-    main->rowgroup_ctr = 0;
-    main->cur_iMCU_row++;
+    mainPtr->rowgroup_ctr = 0;
+    mainPtr->cur_iMCU_row++;
   }
 }
 
@@ -246,16 +246,16 @@ process_data_buffer_main (j_compress_ptr cinfo,
 GLOBAL(void)
 jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
 {
-  my_main_ptr main;
+  my_main_ptr mainPtr;
   int ci;
   jpeg_component_info *compptr;
   int data_unit = cinfo->data_unit;
 
-  main = (my_main_ptr)
+  mainPtr = (my_main_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
         SIZEOF(my_main_controller));
-  cinfo->main = (struct jpeg_c_main_controller *) main;
-  main->pub.start_pass = start_pass_main;
+  cinfo->main = (struct jpeg_c_main_controller *) mainPtr;
+  mainPtr->pub.start_pass = start_pass_main;
 
   /* We don't need to create a buffer in raw-data mode. */
   if (cinfo->raw_data_in)
@@ -270,7 +270,7 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
     /* Note we pad the bottom to a multiple of the iMCU height */
     for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
    ci++, compptr++) {
-      main->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
+      mainPtr->whole_image[ci] = (*cinfo->mem->request_virt_sarray)
   ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
    compptr->width_in_data_units * data_unit,
    (JDIMENSION) jround_up((long) compptr->height_in_data_units,
@@ -282,12 +282,12 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
 #endif
   } else {
 #ifdef FULL_MAIN_BUFFER_SUPPORTED
-    main->whole_image[0] = NULL; /* flag for no virtual arrays */
+    mainPtr->whole_image[0] = NULL; /* flag for no virtual arrays */
 #endif
     /* Allocate a strip buffer for each component */
     for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
    ci++, compptr++) {
-      main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+      mainPtr->buffer[ci] = (*cinfo->mem->alloc_sarray)
   ((j_common_ptr) cinfo, JPOOL_IMAGE,
    compptr->width_in_data_units * data_unit,
    (JDIMENSION) (compptr->v_samp_factor * data_unit));
index f84f7882058bdb17f9754d7276f1503ff52f4f87..fc388d579b44f0cb43cfb3cecf58558067713d4a 100644 (file)
@@ -257,6 +257,8 @@ emit_dac (j_compress_ptr cinfo)
       emit_byte(cinfo, cinfo->arith_ac_K[i]);
     }
   }
+#else
+  (void)cinfo;
 #endif /* C_ARITH_CODING_SUPPORTED */
 }
 
index 8a7318470b73a4d09b73ddc41b66dda1990a3adc..702aafaf4d56779e1a0890ced6bffe6b15975cf6 100644 (file)
@@ -199,6 +199,7 @@ jpeg_difference_first_row(j_compress_ptr cinfo, int ci,
      JSAMPROW input_buf, JSAMPROW prev_row,
      JDIFFROW diff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   DIFFERENCE_1D(INITIAL_PREDICTORx);
 
   /*
index 50657b1247da51c81c10ca250691b5f6cc8f34b1..5b5fb79e4a086b4dc113fa0a4faea9da193a635c 100644 (file)
@@ -74,6 +74,7 @@ typedef my_downsampler * my_downsample_ptr;
 METHODDEF(void)
 start_pass_downsample (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work for now */
 }
 
index 165703730463353ddb3abb0fce29f37bd9ef8095..f0539afed68738f7f0ed35cc34b96326801a0066 100644 (file)
@@ -34,6 +34,7 @@ METHODDEF(void)
 noscale(j_compress_ptr cinfo,
   JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width)
 {
+  (void)cinfo;
   MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE));
   return;
 }
index 91698f80567d80d0074ea3a2b71934d1c56e2861..85557158b7f8aaf0c0fd47012f4fc4a8540e372d 100644 (file)
@@ -629,6 +629,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
index e5302d5d8b146f5d2d7e06e1ab95baaf3f8b5f30..0c94656a68411784d1e076f23056e28514947386 100644 (file)
@@ -278,6 +278,7 @@ compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
   JBLOCKROW MCU_buffer[C_MAX_DATA_UNITS_IN_MCU];
   JBLOCKROW buffer_ptr;
   jpeg_component_info *compptr;
+  (void)input_buf;
 
   /* Align the virtual buffers for the components used in this scan. */
   for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
index 8c539b095b044677752ec701e14ba6b02903619e..531c90b34ee996f63fee1ab817efdbf47b4d45d5 100644 (file)
@@ -168,6 +168,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 METHODDEF(void)
 term_source (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work necessary here */
 }
 
index 49e03f8f09719eed232fb378127b3e3e6083d5ee..2e5ec1100c0d3a3fa8a9b6aa927078a20fbd5671 100644 (file)
@@ -229,6 +229,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;  /* Always indicate nothing was done */
 }
 
index f23777d9e30235ee9a40084da915e7394263122c..7b0aa3d7bda56d78eddb5fb70f6c8021e4e85217 100644 (file)
@@ -309,6 +309,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
 METHODDEF(void)
 start_pass_dcolor (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work needed */
 }
 
index 42a7309ca4b3bce21fe666c537695d6097991ebb..6dc61e44569788272aeed1e7f109171656c1c375 100644 (file)
@@ -238,6 +238,7 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;  /* Always indicate nothing was done */
 }
 
index c3de1169e0ce18b554d35098f3c8621c5c4f3b70..43cb09b719e48f297974d8c8a1babbe797166741 100644 (file)
@@ -159,7 +159,7 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
  * This is done only once, not once per pass.
  */
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   int ci, rgroup;
   int M = cinfo->min_codec_data_unit;
   jpeg_component_info *compptr;
@@ -168,10 +168,10 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
   /* Get top-level space for component array pointers.
    * We alloc both arrays with one call to save a few cycles.
    */
-  main->xbuffer[0] = (JSAMPIMAGE)
+  mainPtr->xbuffer[0] = (JSAMPIMAGE)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
         cinfo->num_components * 2 * SIZEOF(JSAMPARRAY));
-  main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components;
+  mainPtr->xbuffer[1] = mainPtr->xbuffer[0] + cinfo->num_components;
 
   for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
        ci++, compptr++) {
@@ -184,9 +184,9 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
       (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
           2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW));
     xbuf += rgroup;    /* want one row group at negative offsets */
-    main->xbuffer[0][ci] = xbuf;
+    mainPtr->xbuffer[0][ci] = xbuf;
     xbuf += rgroup * (M + 4);
-    main->xbuffer[1][ci] = xbuf;
+    mainPtr->xbuffer[1][ci] = xbuf;
   }
 }
 
@@ -194,13 +194,13 @@ alloc_funny_pointers (j_decompress_ptr cinfo)
 LOCAL(void)
 make_funny_pointers (j_decompress_ptr cinfo)
 /* Create the funny pointer lists discussed in the comments above.
- * The actual workspace is already allocated (in main->buffer),
+ * The actual workspace is already allocated (in mainPtr->buffer),
  * and the space for the pointer lists is allocated too.
  * This routine just fills in the curiously ordered lists.
  * This will be repeated at the beginning of each pass.
  */
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   int ci, i, rgroup;
   int M = cinfo->min_codec_data_unit;
   jpeg_component_info *compptr;
@@ -210,10 +210,10 @@ make_funny_pointers (j_decompress_ptr cinfo)
        ci++, compptr++) {
     rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) /
       cinfo->min_codec_data_unit; /* height of a row group of component */
-    xbuf0 = main->xbuffer[0][ci];
-    xbuf1 = main->xbuffer[1][ci];
+    xbuf0 = mainPtr->xbuffer[0][ci];
+    xbuf1 = mainPtr->xbuffer[1][ci];
     /* First copy the workspace pointers as-is */
-    buf = main->buffer[ci];
+    buf = mainPtr->buffer[ci];
     for (i = 0; i < rgroup * (M + 2); i++) {
       xbuf0[i] = xbuf1[i] = buf[i];
     }
@@ -240,7 +240,7 @@ set_wraparound_pointers (j_decompress_ptr cinfo)
  * This changes the pointer list state from top-of-image to the normal state.
  */
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   int ci, i, rgroup;
   int M = cinfo->min_codec_data_unit;
   jpeg_component_info *compptr;
@@ -250,8 +250,8 @@ set_wraparound_pointers (j_decompress_ptr cinfo)
        ci++, compptr++) {
     rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) /
       cinfo->min_codec_data_unit; /* height of a row group of component */
-    xbuf0 = main->xbuffer[0][ci];
-    xbuf1 = main->xbuffer[1][ci];
+    xbuf0 = mainPtr->xbuffer[0][ci];
+    xbuf1 = mainPtr->xbuffer[1][ci];
     for (i = 0; i < rgroup; i++) {
       xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i];
       xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i];
@@ -269,7 +269,7 @@ set_bottom_pointers (j_decompress_ptr cinfo)
  * Also sets rowgroups_avail to indicate number of nondummy row groups in row.
  */
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   int ci, i, rgroup, iMCUheight, rows_left;
   jpeg_component_info *compptr;
   JSAMPARRAY xbuf;
@@ -286,12 +286,12 @@ set_bottom_pointers (j_decompress_ptr cinfo)
      * so we need only do it once.
      */
     if (ci == 0) {
-      main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
+      mainPtr->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1);
     }
     /* Duplicate the last real sample row rgroup*2 times; this pads out the
      * last partial rowgroup and ensures at least one full rowgroup of context.
      */
-    xbuf = main->xbuffer[main->whichptr][ci];
+    xbuf = mainPtr->xbuffer[mainPtr->whichptr][ci];
     for (i = 0; i < rgroup * 2; i++) {
       xbuf[rows_left + i] = xbuf[rows_left-1];
     }
@@ -306,27 +306,27 @@ set_bottom_pointers (j_decompress_ptr cinfo)
 METHODDEF(void)
 start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
 
   switch (pass_mode) {
   case JBUF_PASS_THRU:
     if (cinfo->upsample->need_context_rows) {
-      main->pub.process_data = process_data_context_main;
+      mainPtr->pub.process_data = process_data_context_main;
       make_funny_pointers(cinfo); /* Create the xbuffer[] lists */
-      main->whichptr = 0;  /* Read first iMCU row into xbuffer[0] */
-      main->context_state = CTX_PREPARE_FOR_IMCU;
-      main->iMCU_row_ctr = 0;
+      mainPtr->whichptr = 0;  /* Read first iMCU row into xbuffer[0] */
+      mainPtr->context_state = CTX_PREPARE_FOR_IMCU;
+      mainPtr->iMCU_row_ctr = 0;
     } else {
       /* Simple case with no context needed */
-      main->pub.process_data = process_data_simple_main;
+      mainPtr->pub.process_data = process_data_simple_main;
     }
-    main->buffer_full = FALSE;  /* Mark buffer empty */
-    main->rowgroup_ctr = 0;
+    mainPtr->buffer_full = FALSE;  /* Mark buffer empty */
+    mainPtr->rowgroup_ctr = 0;
     break;
 #ifdef QUANT_2PASS_SUPPORTED
   case JBUF_CRANK_DEST:
     /* For last pass of 2-pass quantization, just crank the postprocessor */
-    main->pub.process_data = process_data_crank_post;
+    mainPtr->pub.process_data = process_data_crank_post;
     break;
 #endif
   default:
@@ -346,14 +346,14 @@ process_data_simple_main (j_decompress_ptr cinfo,
         JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
         JDIMENSION out_rows_avail)
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
   JDIMENSION rowgroups_avail;
 
   /* Read input data if we haven't filled the main buffer yet */
-  if (! main->buffer_full) {
-    if (! (*cinfo->codec->decompress_data) (cinfo, main->buffer))
+  if (! mainPtr->buffer_full) {
+    if (! (*cinfo->codec->decompress_data) (cinfo, mainPtr->buffer))
       return;      /* suspension forced, can do nothing more */
-    main->buffer_full = TRUE;  /* OK, we have an iMCU row to work with */
+    mainPtr->buffer_full = TRUE;  /* OK, we have an iMCU row to work with */
   }
 
   /* There are always min_codec_data_unit row groups in an iMCU row. */
@@ -364,14 +364,14 @@ process_data_simple_main (j_decompress_ptr cinfo,
    */
 
   /* Feed the postprocessor */
-  (*cinfo->post->post_process_data) (cinfo, main->buffer,
-             &main->rowgroup_ctr, rowgroups_avail,
+  (*cinfo->post->post_process_data) (cinfo, mainPtr->buffer,
+             &mainPtr->rowgroup_ctr, rowgroups_avail,
              output_buf, out_row_ctr, out_rows_avail);
 
   /* Has postprocessor consumed all the data yet? If so, mark buffer empty */
-  if (main->rowgroup_ctr >= rowgroups_avail) {
-    main->buffer_full = FALSE;
-    main->rowgroup_ctr = 0;
+  if (mainPtr->rowgroup_ctr >= rowgroups_avail) {
+    mainPtr->buffer_full = FALSE;
+    mainPtr->rowgroup_ctr = 0;
   }
 }
 
@@ -386,15 +386,15 @@ process_data_context_main (j_decompress_ptr cinfo,
          JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
          JDIMENSION out_rows_avail)
 {
-  my_main_ptr main = (my_main_ptr) cinfo->main;
+  my_main_ptr mainPtr = (my_main_ptr) cinfo->main;
 
   /* Read input data if we haven't filled the main buffer yet */
-  if (! main->buffer_full) {
+  if (! mainPtr->buffer_full) {
     if (! (*cinfo->codec->decompress_data) (cinfo,
-             main->xbuffer[main->whichptr]))
+             mainPtr->xbuffer[mainPtr->whichptr]))
       return;      /* suspension forced, can do nothing more */
-    main->buffer_full = TRUE;  /* OK, we have an iMCU row to work with */
-    main->iMCU_row_ctr++;  /* count rows received */
+    mainPtr->buffer_full = TRUE;  /* OK, we have an iMCU row to work with */
+    mainPtr->iMCU_row_ctr++;  /* count rows received */
   }
 
   /* Postprocessor typically will not swallow all the input data it is handed
@@ -402,47 +402,47 @@ process_data_context_main (j_decompress_ptr cinfo,
    * to exit and restart.  This switch lets us keep track of how far we got.
    * Note that each case falls through to the next on successful completion.
    */
-  switch (main->context_state) {
+  switch (mainPtr->context_state) {
   case CTX_POSTPONED_ROW:
     /* Call postprocessor using previously set pointers for postponed row */
-    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
-      &main->rowgroup_ctr, main->rowgroups_avail,
+    (*cinfo->post->post_process_data) (cinfo, mainPtr->xbuffer[mainPtr->whichptr],
+      &mainPtr->rowgroup_ctr, mainPtr->rowgroups_avail,
       output_buf, out_row_ctr, out_rows_avail);
-    if (main->rowgroup_ctr < main->rowgroups_avail)
+    if (mainPtr->rowgroup_ctr < mainPtr->rowgroups_avail)
       return;      /* Need to suspend */
-    main->context_state = CTX_PREPARE_FOR_IMCU;
+    mainPtr->context_state = CTX_PREPARE_FOR_IMCU;
     if (*out_row_ctr >= out_rows_avail)
       return;      /* Postprocessor exactly filled output buf */
     /*FALLTHROUGH*/
   case CTX_PREPARE_FOR_IMCU:
     /* Prepare to process first M-1 row groups of this iMCU row */
-    main->rowgroup_ctr = 0;
-    main->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit - 1);
+    mainPtr->rowgroup_ctr = 0;
+    mainPtr->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit - 1);
     /* Check for bottom of image: if so, tweak pointers to "duplicate"
      * the last sample row, and adjust rowgroups_avail to ignore padding rows.
      */
-    if (main->iMCU_row_ctr == cinfo->total_iMCU_rows)
+    if (mainPtr->iMCU_row_ctr == cinfo->total_iMCU_rows)
       set_bottom_pointers(cinfo);
-    main->context_state = CTX_PROCESS_IMCU;
+    mainPtr->context_state = CTX_PROCESS_IMCU;
     /*FALLTHROUGH*/
   case CTX_PROCESS_IMCU:
     /* Call postprocessor using previously set pointers */
-    (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr],
-      &main->rowgroup_ctr, main->rowgroups_avail,
+    (*cinfo->post->post_process_data) (cinfo, mainPtr->xbuffer[mainPtr->whichptr],
+      &mainPtr->rowgroup_ctr, mainPtr->rowgroups_avail,
       output_buf, out_row_ctr, out_rows_avail);
-    if (main->rowgroup_ctr < main->rowgroups_avail)
+    if (mainPtr->rowgroup_ctr < mainPtr->rowgroups_avail)
       return;      /* Need to suspend */
     /* After the first iMCU, change wraparound pointers to normal state */
-    if (main->iMCU_row_ctr == 1)
+    if (mainPtr->iMCU_row_ctr == 1)
       set_wraparound_pointers(cinfo);
     /* Prepare to load new iMCU row using other xbuffer list */
-    main->whichptr ^= 1;  /* 0=>1 or 1=>0 */
-    main->buffer_full = FALSE;
+    mainPtr->whichptr ^= 1;  /* 0=>1 or 1=>0 */
+    mainPtr->buffer_full = FALSE;
     /* Still need to process last row group of this iMCU row, */
     /* which is saved at index M+1 of the other xbuffer */
-    main->rowgroup_ctr = (JDIMENSION) (cinfo->min_codec_data_unit + 1);
-    main->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit + 2);
-    main->context_state = CTX_POSTPONED_ROW;
+    mainPtr->rowgroup_ctr = (JDIMENSION) (cinfo->min_codec_data_unit + 1);
+    mainPtr->rowgroups_avail = (JDIMENSION) (cinfo->min_codec_data_unit + 2);
+    mainPtr->context_state = CTX_POSTPONED_ROW;
   }
 }
 
@@ -475,15 +475,15 @@ process_data_crank_post (j_decompress_ptr cinfo,
 GLOBAL(void)
 jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
 {
-  my_main_ptr main;
+  my_main_ptr mainPtr;
   int ci, rgroup, ngroups;
   jpeg_component_info *compptr;
 
-  main = (my_main_ptr)
+  mainPtr = (my_main_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
         SIZEOF(my_main_controller));
-  cinfo->main = (struct jpeg_d_main_controller *) main;
-  main->pub.start_pass = start_pass_main;
+  cinfo->main = (struct jpeg_d_main_controller *) mainPtr;
+  mainPtr->pub.start_pass = start_pass_main;
 
   if (need_full_buffer)    /* shouldn't happen */
     ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
@@ -504,7 +504,7 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
        ci++, compptr++) {
     rgroup = (compptr->v_samp_factor * compptr->codec_data_unit) /
       cinfo->min_codec_data_unit; /* height of a row group of component */
-    main->buffer[ci] = (*cinfo->mem->alloc_sarray)
+    mainPtr->buffer[ci] = (*cinfo->mem->alloc_sarray)
       ((j_common_ptr) cinfo, JPOOL_IMAGE,
        compptr->width_in_data_units * compptr->codec_data_unit,
        (JDIMENSION) (rgroup * ngroups));
index 3474595fac3426d0e3100fd99a931e22b3c03dfd..7a235959126955f8ac9f124e23972fbf76530ef7 100644 (file)
@@ -151,6 +151,7 @@ merged_2v_upsample (j_decompress_ptr cinfo,
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   JSAMPROW work_ptrs[2];
   JDIMENSION num_rows;    /* number of rows returned to caller */
+  (void)in_row_groups_avail;
 
   if (upsample->spare_full) {
     /* If we have a spare row saved from a previous cycle, just return it. */
@@ -198,6 +199,7 @@ merged_1v_upsample (j_decompress_ptr cinfo,
 /* 1:1 vertical sampling case: much easier, never need a spare row. */
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
+  (void)in_row_groups_avail;(void)out_rows_avail;
 
   /* Just do the upsampling. */
   (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,
index 3fdb290c491cb8780ff94b470844b9a9eaa4dd80..760eb19abd0d0c93b0cd738d64b608865ce3699e 100644 (file)
@@ -163,6 +163,7 @@ post_process_prepass (j_decompress_ptr cinfo,
 {
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION old_next_row, num_rows;
+  (void)output_buf;(void)out_rows_avail;
 
   /* Reposition virtual buffer if at start of strip. */
   if (post->next_row == 0) {
@@ -207,6 +208,7 @@ post_process_2pass (j_decompress_ptr cinfo,
 {
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION num_rows, max_rows;
+  (void)input_buf;(void)in_row_group_ctr;(void)in_row_groups_avail;
 
   /* Reposition virtual buffer if at start of strip. */
   if (post->next_row == 0) {
index d8f9f8766f818e5e1290678a47eb374616763656..3e987bed9755f5363c81b5c0e108062351e83a04 100644 (file)
@@ -100,6 +100,7 @@ jpeg_undifference1(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   UNDIFFERENCE_1D(INITIAL_PREDICTOR2);
 }
 
@@ -108,6 +109,7 @@ jpeg_undifference2(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   UNDIFFERENCE_2D(PREDICTOR2);
 }
 
@@ -116,6 +118,7 @@ jpeg_undifference3(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   UNDIFFERENCE_2D(PREDICTOR3);
 }
 
@@ -124,6 +127,7 @@ jpeg_undifference4(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   UNDIFFERENCE_2D(PREDICTOR4);
 }
 
@@ -132,6 +136,7 @@ jpeg_undifference5(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR5);
 }
@@ -141,6 +146,7 @@ jpeg_undifference6(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR6);
 }
@@ -150,6 +156,7 @@ jpeg_undifference7(j_decompress_ptr cinfo, int comp_index,
        JDIFFROW diff_buf, JDIFFROW prev_row,
        JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;(void)comp_index;(void)diff_buf;(void)prev_row;(void)undiff_buf;(void)width;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR7);
 }
@@ -167,6 +174,7 @@ jpeg_undifference_first_row(j_decompress_ptr cinfo, int comp_index,
           JDIFFROW diff_buf, JDIFFROW prev_row,
           JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec;
 
   UNDIFFERENCE_1D(INITIAL_PREDICTORx);
index 738e19c3179ed036c09b49692618b10507933d57..a36283e29c293d8e218e9f99a1872e4ac57e9581 100644 (file)
@@ -96,6 +96,7 @@ sep_upsample (j_decompress_ptr cinfo,
   int ci;
   jpeg_component_info * compptr;
   JDIMENSION num_rows;
+  (void)in_row_groups_avail;
 
   /* Fill the conversion buffer, if it's empty */
   if (upsample->next_row_out >= cinfo->max_v_samp_factor) {
@@ -157,6 +158,7 @@ METHODDEF(void)
 fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
        JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;(void)compptr;
   *output_data_ptr = input_data;
 }
 
@@ -170,6 +172,7 @@ METHODDEF(void)
 noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
          JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;(void)compptr;(void)input_data;
   *output_data_ptr = NULL;  /* safety check */
 }
 
@@ -238,6 +241,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
   register JSAMPLE invalue;
   JSAMPROW outend;
   int inrow;
+  (void)compptr;
 
   for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
     inptr = input_data[inrow];
@@ -266,6 +270,7 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
   register JSAMPLE invalue;
   JSAMPROW outend;
   int inrow, outrow;
+  (void)compptr;
 
   inrow = outrow = 0;
   while (outrow < cinfo->max_v_samp_factor) {
index b546b19d820569ec74586aadbb3c6a734a4a0e7e..9cdd9b7260ae5a360757647bbccf354ca81b7129 100644 (file)
@@ -68,6 +68,7 @@ noscale(j_decompress_ptr cinfo,
   JDIMENSION width)
 {
   unsigned int xindex;
+  (void)cinfo;
 
   for (xindex = 0; xindex < width; xindex++)
     output_buf[xindex] = (JSAMPLE) diff_buf[xindex];
index 71caa6718138a25e474f51fc2b7c3e8330514f12..6757d4b3c21960e809b6c4c1b420c71a4c81363d 100644 (file)
@@ -34,12 +34,14 @@ extern void free JPP((void *ptr));
 GLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void)cinfo;
   return (void *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
+  (void)cinfo;(void)sizeofobject;
   free(object);
 }
 
@@ -54,12 +56,14 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 GLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void)cinfo;
   return (void FAR *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
+  (void)cinfo;(void)sizeofobject;
   free(object);
 }
 
@@ -73,6 +77,7 @@ GLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
         long max_bytes_needed, long already_allocated)
 {
+  (void)cinfo;(void)min_bytes_needed;(void)already_allocated;
   return max_bytes_needed;
 }
 
@@ -87,6 +92,7 @@ GLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
        long total_bytes_needed)
 {
+  (void)info;(void)total_bytes_needed;
   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
 }
 
@@ -99,11 +105,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 GLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
+  (void)cinfo;
   return 0;      /* just set max_memory_to_use to 0 */
 }
 
 GLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
+  (void)cinfo;
   /* no work */
 }
index 9a0e28442afac9dd31e5b4faf657bebb078fc8c7..a5abd0a8bd500bf4c55ab03cdbf08d16e34b2221 100644 (file)
@@ -246,6 +246,7 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return j'th output value, where j will range from 0 to maxj */
 /* The output values must fall in 0..MAXJSAMPLE in increasing order */
 {
+  (void)cinfo;(void)ci;
   /* We always provide values 0 and MAXJSAMPLE for each component;
    * any additional values are equally spaced between these limits.
    * (Forcing the upper and lower values to the limits ensures that
@@ -260,6 +261,7 @@ largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return largest input value that should map to j'th output value */
 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
 {
+  (void)cinfo;(void)ci;
   /* Breakpoints are halfway between values returned by output_value */
   return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
 }
@@ -743,6 +745,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   size_t arraysize;
   int i;
+  (void)is_pre_scan;
 
   /* Install my colormap. */
   cinfo->colormap = cquantize->sv_colormap;
@@ -797,6 +800,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 METHODDEF(void)
 finish_pass_1_quant (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work in 1-pass case */
 }
 
index c145f76650126d1abba8f68edce684b429c3f538..9f9f7091906c0f455f9c4bc93897161dd7dcf971 100644 (file)
@@ -231,6 +231,7 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
   int row;
   JDIMENSION col;
   JDIMENSION width = cinfo->output_width;
+  (void)output_buf;
 
   for (row = 0; row < num_rows; row++) {
     ptr = input_buf[row];
@@ -1155,6 +1156,7 @@ finish_pass1 (j_decompress_ptr cinfo)
 METHODDEF(void)
 finish_pass2 (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work */
 }