Skip to content

Commit c975304

Browse files
addressing more clang compiler warnings
1 parent 6eee479 commit c975304

File tree

7 files changed

+12
-18
lines changed

7 files changed

+12
-18
lines changed

framework/modules/saf_sofa_reader/libmysofa/internal/hdf_dataobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static int readOHDRHeaderMessageGroupInfo(struct READER *reader,
648648
static int readOHDRHeaderMessageFilterPipelineV1(struct READER *reader,
649649
uint8_t filters) {
650650
int i, j;
651-
uint16_t filter_identification_value, number_client_data_values, namelength, flags;
651+
uint16_t filter_identification_value, number_client_data_values, namelength;//, flags;
652652

653653
if (readValue(reader, 6) != 0) {
654654
mylog("reserved values not zero\n");
@@ -670,7 +670,7 @@ static int readOHDRHeaderMessageFilterPipelineV1(struct READER *reader,
670670
// LCOV_EXCL_STOP
671671
}
672672
namelength = (uint16_t)readValue(reader, 2);
673-
flags = (uint16_t)readValue(reader, 2);
673+
//flags = (uint16_t)readValue(reader, 2);
674674
number_client_data_values = (uint16_t)readValue(reader, 2);
675675

676676
if (namelength > 0)

framework/resources/convhull_3d/convhull_3d.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ void convhull_nd_build
996996
reldist[i] += pow(absdist[i*d+j], 2.0);
997997

998998
/* Sort from maximum to minimum relative distance */
999-
int num_pleft, cnt;
999+
int num_pleft;
10001000
int* ind, *pleft;
10011001
ind = (int*)malloc((nVert-d-1) * sizeof(int));
10021002
pleft = (int*)malloc((nVert-d-1) * sizeof(int));
@@ -1012,10 +1012,6 @@ void convhull_nd_build
10121012
occurs every #iter2del# iterations of this while loop */
10131013
memset(A, 0, (d+1)*(d+1) * sizeof(CH_FLOAT));
10141014

1015-
/* cnt is equal to the points having been selected without deletion of
1016-
nonvisible points (i.e. points inside the current convex hull) */
1017-
cnt=0;
1018-
10191015
/* The main loop for the quickhull algorithm */
10201016
CH_FLOAT detA;
10211017
CH_FLOAT* points_cf, *points_s;
@@ -1044,9 +1040,6 @@ void convhull_nd_build
10441040
else
10451041
pleft = (int*)realloc(pleft, num_pleft*sizeof(int));
10461042

1047-
/* Update point selection counter */
1048-
cnt++;
1049-
10501043
/* find visible faces */
10511044
for(j=0; j<d; j++)
10521045
points_s[j] = points[i*(d+1)+j];

test/src/test__reverb_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void test__ims_shoebox_RIR(void){
2828
void* hIms;
2929
float maxTime_s;
3030
float mov_src_pos[3], mov_rec_pos[3];
31-
int sourceID_1, sourceID_2, sourceID_3, sourceID_4, sourceID_5, receiverID;
31+
int sourceID_1, sourceID_3, sourceID_4, receiverID;
3232
int i;
3333

3434
/* Config */
@@ -53,7 +53,7 @@ void test__ims_shoebox_RIR(void){
5353
/* Set-up the shoebox room simulator, with two sources and one spherical harmonic receiver */
5454
ims_shoebox_create(&hIms, (float*)roomdims, (float*)abs_wall, 125.0f, nBands, 343.0f, 48e3f);
5555
sourceID_1 = ims_shoebox_addSource(hIms, (float*)src_pos, NULL);
56-
sourceID_2 = ims_shoebox_addSource(hIms, (float*)src2_pos, NULL);
56+
ims_shoebox_addSource(hIms, (float*)src2_pos, NULL);
5757
receiverID = ims_shoebox_addReceiverSH(hIms, sh_order, (float*)rec_pos, NULL);
5858

5959
/* Moving source No.1 and the receiver */
@@ -76,7 +76,7 @@ void test__ims_shoebox_RIR(void){
7676
* (Just messing around, trying to trip up an IMS internal assertion) */
7777
sourceID_3 = ims_shoebox_addSource(hIms, (float*)src3_pos, NULL);
7878
sourceID_4 = ims_shoebox_addSource(hIms, (float*)src4_pos, NULL);
79-
sourceID_5 = ims_shoebox_addSource(hIms, (float*)src5_pos, NULL);
79+
ims_shoebox_addSource(hIms, (float*)src5_pos, NULL);
8080
ims_shoebox_removeSource(hIms, sourceID_3);
8181
ims_shoebox_removeSource(hIms, sourceID_4);
8282
sourceID_4 = ims_shoebox_addSource(hIms, (float*)src4_pos, NULL);

test/src/test__sh_module.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void test__computeSectorCoeffsEP(void){
419419
}
420420

421421
void test__checkCondNumberSHTReal(void){
422-
int i, j, nDirs, order, nSH;
422+
int i, j, nDirs, order;
423423
float* t_dirs_deg, *cond_N;
424424
float** t_dirs_rad;
425425

@@ -431,7 +431,6 @@ void test__checkCondNumberSHTReal(void){
431431
/* Loop over orders */
432432
for(i=0; i<nTestOrders; i++) {
433433
order = testOrders[i];
434-
nSH = ORDER2NSH(order);
435434

436435
/* Pull an appropriate t-design */
437436
t_dirs_deg = (float*)__HANDLES_Tdesign_dirs_deg[2 * order];

test/src/test__sofa_reader_module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ void test__saf_sofa_open(void){
3737
/* Note that saf_sofa_open() reverts to mysofa_load(), if SAF_ENABLE_NETCDF is not defined */
3838
error = saf_sofa_open(&sofa, SAF_TEST_SOFA_FILE_PATH, SAF_SOFA_READER_OPTION_DEFAULT);
3939
saf_sofa_close(&sofa);
40+
TEST_ASSERT_TRUE( (error==SAF_SOFA_OK) || (error==SAF_SOFA_ERROR_FORMAT_UNEXPECTED) );
4041
}
4142
}
4243

test/src/test__utilities_module.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ void test__smb_pitchShifter(void){
521521
float* inputData, *outputData;
522522
void* hPS, *hFFT;
523523
float frequency;
524-
int i, smbLatency, ind;
524+
int i, ind;
525525

526526
/* Config */
527527
const int sampleRate = 48000;
@@ -536,8 +536,7 @@ void test__smb_pitchShifter(void){
536536
frequency = (float)sampleRate/8.0f;
537537
for(i=0; i<nSamples; i++) /* sine tone at quarter Nyquist: */
538538
inputData[i] = sinf(2.0f * SAF_PI * (float)i * frequency/(float)sampleRate);
539-
smbLatency = FFTsize - (FFTsize/osfactor);
540-
539+
541540
/* Pitch shift down one octave */
542541
smb_pitchShift_apply(hPS, 0.5, nSamples, inputData, outputData);
543542

test/test.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,7 @@
13361336
OTHER_CFLAGS = (
13371337
"-Wall",
13381338
"-Wextra",
1339+
"-Wno-strict-prototypes",
13391340
);
13401341
OTHER_CPLUSPLUSFLAGS = "";
13411342
OTHER_LDFLAGS = "";
@@ -1372,6 +1373,7 @@
13721373
OTHER_CFLAGS = (
13731374
"-Wall",
13741375
"-Wextra",
1376+
"-Wno-strict-prototypes",
13751377
);
13761378
OTHER_CPLUSPLUSFLAGS = "";
13771379
OTHER_LDFLAGS = "";

0 commit comments

Comments
 (0)