Skip to content

Commit c6a7f5a

Browse files
committed
Merge pull request #4 from mdaus/warnings
Remove formal parameter warnings from BandSource.c
2 parents 83ad28c + 86025e9 commit c6a7f5a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

modules/c/nitf/source/BandSource.c

+11-7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ NITFPRIV(NITF_BOOL) MemorySource_contigRead(
5757
nitf_Off size,
5858
nitf_Error* error)
5959
{
60+
(void) error; /* Suppresses a warning. Param seems to exist for consistency purposes. Not used. */
6061
memcpy(buf,
6162
(const nitf_Uint8*)memorySource->data + memorySource->mark,
6263
(size_t)size);
@@ -69,8 +70,9 @@ NITFPRIV(NITF_BOOL) MemorySource_offsetRead(
6970
MemorySourceImpl* memorySource,
7071
void* buf,
7172
nitf_Off size,
72-
nitf_Error * error)
73+
nitf_Error* error)
7374
{
75+
(void) error;
7476
size_t destOffset = 0;
7577
const nitf_Uint8* const src = (const nitf_Uint8*)memorySource->data;
7678
nitf_Uint8* const dest = (nitf_Uint8*)buf;
@@ -121,18 +123,19 @@ NITFPRIV(void) MemorySource_destruct(NITF_DATA * data)
121123
}
122124

123125

124-
NITFPRIV(nitf_Off) MemorySource_getSize(NITF_DATA * data, nitf_Error *e)
126+
NITFPRIV(nitf_Off) MemorySource_getSize(NITF_DATA * data, nitf_Error* error)
125127
{
128+
(void) error;
126129
MemorySourceImpl *memorySource = (MemorySourceImpl *) data;
127130
return memorySource ? memorySource->size : 0;
128131
}
129132

130-
NITFPRIV(NITF_BOOL) MemorySource_setSize(NITF_DATA * data, nitf_Off size, nitf_Error *e)
133+
NITFPRIV(NITF_BOOL) MemorySource_setSize(NITF_DATA * data, nitf_Off size, nitf_Error *error)
131134
{
132135
MemorySourceImpl *memorySource = (MemorySourceImpl *) data;
133136
if (!memorySource)
134137
{
135-
nitf_Error_init(e, "Null pointer reference",
138+
nitf_Error_init(error, "Null pointer reference",
136139
NITF_CTXT, NITF_ERR_INVALID_OBJECT);
137140
return NITF_FAILURE;
138141
}
@@ -221,19 +224,20 @@ NITFPRIV(void) FileSource_destruct(NITF_DATA * data)
221224
}
222225
}
223226

224-
NITFPRIV(nitf_Off) IOSource_getSize(NITF_DATA * data, nitf_Error *e)
227+
NITFPRIV(nitf_Off) IOSource_getSize(NITF_DATA * data, nitf_Error* error)
225228
{
229+
(void) error;
226230
IOSourceImpl *source = (IOSourceImpl *) data;
227231
return source ? (nitf_Off)source->size : 0;
228232
}
229233

230234

231-
NITFPRIV(NITF_BOOL) IOSource_setSize(NITF_DATA * data, nitf_Off size, nitf_Error *e)
235+
NITFPRIV(NITF_BOOL) IOSource_setSize(NITF_DATA * data, nitf_Off size, nitf_Error *error)
232236
{
233237
IOSourceImpl *source = (IOSourceImpl *) data;
234238
if (!source)
235239
{
236-
nitf_Error_init(e, "Null pointer reference",
240+
nitf_Error_init(error, "Null pointer reference",
237241
NITF_CTXT, NITF_ERR_INVALID_OBJECT);
238242
return NITF_FAILURE;
239243
}

0 commit comments

Comments
 (0)