summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2011-08-10 08:12:10 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2011-08-10 08:12:10 +0000
commit676f8f189f338ababaf67fe652c708e82770d524 (patch)
tree6744b58e9faf0c9538c7c217bebd2b68c9b81775 /libopenjpeg
parentdf44837b0731ab7c231b8b3159c5f0600ee2f5e8 (diff)
removed unused parameters warnings with the solution proposed by myself and Bob Friesenhahn
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/j2k.c6
-rw-r--r--libopenjpeg/jp2.c9
-rw-r--r--libopenjpeg/openjpeg.c4
-rw-r--r--libopenjpeg/opj_includes.h3
-rw-r--r--libopenjpeg/t1.c6
-rw-r--r--libopenjpeg/tcd.c2
6 files changed, 27 insertions, 3 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c
index 0b09899a..0a58a81a 100644
--- a/libopenjpeg/j2k.c
+++ b/libopenjpeg/j2k.c
@@ -297,6 +297,9 @@ static int j2k_get_num_tp(opj_cp_t *cp,int pino,int tileno){
/** mem allocation for TLM marker*/
int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){
int pino,tileno,totnum_tp=0;
+
+ OPJ_ARG_NOT_USED(img_numcomp);
+
j2k->cur_totnum_tp = (int *) opj_malloc(cp->tw * cp->th * sizeof(int));
for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
int cur_totnum_tp = 0;
@@ -1848,8 +1851,9 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestre
opj_jpt_msg_header_t header;
int position;
+ OPJ_ARG_NOT_USED(cstr_info);
+
opj_common_ptr cinfo = j2k->cinfo;
-
j2k->cio = cio;
/* create an empty image */
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c
index 39d48a5f..9c9c476f 100644
--- a/libopenjpeg/jp2.c
+++ b/libopenjpeg/jp2.c
@@ -398,6 +398,9 @@ static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio,
unsigned short i, j;
unsigned char uc;
+ OPJ_ARG_NOT_USED(box);
+ OPJ_ARG_NOT_USED(jp2);
+
/* Part 1, I.5.3.4: 'There shall be at most one Palette box inside
* a JP2 Header box' :
*/
@@ -446,6 +449,9 @@ static opj_bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio,
opj_jp2_cmap_comp_t *cmap;
unsigned short i, nr_channels;
+ OPJ_ARG_NOT_USED(box);
+ OPJ_ARG_NOT_USED(jp2);
+
/* Need nr_channels: */
if(color->jp2_pclr == NULL) return OPJ_FALSE;
@@ -511,6 +517,9 @@ static opj_bool jp2_read_cdef(opj_jp2_t *jp2, opj_cio_t *cio,
opj_jp2_cdef_info_t *info;
unsigned short i, n;
+ OPJ_ARG_NOT_USED(box);
+ OPJ_ARG_NOT_USED(jp2);
+
/* Part 1, I.5.3.6: 'The shall be at most one Channel Definition box
* inside a JP2 Header box.'
*/
diff --git a/libopenjpeg/openjpeg.c b/libopenjpeg/openjpeg.c
index 790f2eea..00a910ec 100644
--- a/libopenjpeg/openjpeg.c
+++ b/libopenjpeg/openjpeg.c
@@ -36,6 +36,10 @@
#ifndef OPJ_STATIC
BOOL APIENTRY
DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
+
+ OPJ_ARG_NOT_USED(lpReserved);
+ OPJ_ARG_NOT_USED(hModule);
+
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH :
break;
diff --git a/libopenjpeg/opj_includes.h b/libopenjpeg/opj_includes.h
index 53a0c4a7..8da9dbdc 100644
--- a/libopenjpeg/opj_includes.h
+++ b/libopenjpeg/opj_includes.h
@@ -104,6 +104,9 @@ static INLINE long lrintf(float f){
}
#endif
+// Avoid compile-time warning because parameter is not used
+#define OPJ_ARG_NOT_USED(x) (void)(x)
+
#include "j2k_lib.h"
#include "opj_malloc.h"
#include "event.h"
diff --git a/libopenjpeg/t1.c b/libopenjpeg/t1.c
index 002a82d4..b3ede36a 100644
--- a/libopenjpeg/t1.c
+++ b/libopenjpeg/t1.c
@@ -382,9 +382,10 @@ static INLINE void t1_dec_sigpass_step_raw(
int vsc)
{
int v, flag;
-
opj_raw_t *raw = t1->raw; /* RAW component */
+ OPJ_ARG_NOT_USED(orient);
+
flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp);
if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) {
if (raw_decode(raw)) {
@@ -823,9 +824,10 @@ static void t1_dec_clnpass_step_partial(
int oneplushalf)
{
int v, flag;
-
opj_mqc_t *mqc = t1->mqc; /* MQC component */
+ OPJ_ARG_NOT_USED(orient);
+
flag = *flagsp;
mqc_setcurctx(mqc, t1_getctxno_sc(flag));
v = mqc_decode(mqc) ^ t1_getspb(flag);
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c
index 26548564..fc25179a 100644
--- a/libopenjpeg/tcd.c
+++ b/libopenjpeg/tcd.c
@@ -676,6 +676,8 @@ void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp,
opj_tcp_t *tcp;
opj_tcd_tile_t *tile;
+ OPJ_ARG_NOT_USED(cstr_info);
+
tcd->cp = cp;
tcp = &(cp->tcps[cp->tileno[tileno]]);