Skip to content

Commit d69b118

Browse files
authored
Merge pull request #3344 from BsAtHome/fix_rt-wextra-noncomp
Fix -Wextra in RT non-componentized code
2 parents 5da9d93 + 26f1abe commit d69b118

81 files changed

Lines changed: 330 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/emc/kinematics/5axiskins.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static int fiveaxis_KinematicsForward(const double *joints,
101101
const KINEMATICS_FORWARD_FLAGS * fflags,
102102
KINEMATICS_INVERSE_FLAGS * iflags)
103103
{
104+
(void)fflags;
105+
(void)iflags;
104106
PmCartesian r = s2r(*(haldata->pivot_length) + joints[JW],
105107
joints[JC],
106108
180.0 - joints[JB]);
@@ -126,6 +128,8 @@ static int fiveaxis_KinematicsInverse(const EmcPose * pos,
126128
const KINEMATICS_INVERSE_FLAGS * iflags,
127129
KINEMATICS_FORWARD_FLAGS * fflags)
128130
{
131+
(void)iflags;
132+
(void)fflags;
129133
PmCartesian r = s2r(*(haldata->pivot_length) + pos->w,
130134
pos->c,
131135
180.0 - pos->b);

src/emc/kinematics/corexykins.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ int kinematicsForward(const double *joints
2222
,const KINEMATICS_FORWARD_FLAGS *fflags
2323
,KINEMATICS_INVERSE_FLAGS *iflags
2424
) {
25+
(void)fflags;
26+
(void)iflags;
2527
pos->tran.x = 0.5 * (joints[0] + joints[1]);
2628
pos->tran.y = 0.5 * (joints[0] - joints[1]);
2729
pos->tran.z = joints[2];
@@ -40,6 +42,8 @@ int kinematicsInverse(const EmcPose *pos
4042
,const KINEMATICS_INVERSE_FLAGS *iflags
4143
,KINEMATICS_FORWARD_FLAGS *fflags
4244
) {
45+
(void)iflags;
46+
(void)fflags;
4347
joints[0] = pos->tran.x + pos->tran.y;
4448
joints[1] = pos->tran.x - pos->tran.y;
4549
joints[2] = pos->tran.z;

src/emc/kinematics/cubic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static double interpolateAccel(CUBIC_COEFF coeff, double t)
8888
*/
8989
static double interpolateJerk(CUBIC_COEFF coeff, double t)
9090
{
91+
(void)t;
9192
return 6.0 * coeff.a;
9293
}
9394

src/emc/kinematics/genhexkins.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ static int genhexKinematicsForward(const double * joints,
329329
const KINEMATICS_FORWARD_FLAGS * fflags,
330330
KINEMATICS_INVERSE_FLAGS * iflags)
331331
{
332+
(void)fflags;
333+
(void)iflags;
332334
PmCartesian aw;
333335
PmCartesian InvKinStrutVect,InvKinStrutVectUnit;
334336
PmCartesian q_trans, RMatrix_a, RMatrix_a_cross_Strut;
@@ -345,7 +347,7 @@ static int genhexKinematicsForward(const double * joints,
345347

346348
int iterate = 1;
347349
int i;
348-
int iteration = 0;
350+
unsigned iteration = 0;
349351

350352
genhex_read_hal_pins();
351353

@@ -491,6 +493,8 @@ static int genhexKinematicsInverse(const EmcPose * pos,
491493
const KINEMATICS_INVERSE_FLAGS * iflags,
492494
KINEMATICS_FORWARD_FLAGS * fflags)
493495
{
496+
(void)iflags;
497+
(void)fflags;
494498

495499
PmCartesian aw, temp;
496500
PmCartesian InvKinStrutVect, InvKinStrutVectUnit;
@@ -541,6 +545,7 @@ int genhexKinematicsSetup(const int comp_id,
541545
const char* coordinates,
542546
kparms* kp)
543547
{
548+
(void)coordinates;
544549
int i,res=0;
545550

546551
haldata = hal_malloc(sizeof(struct haldata));

src/emc/kinematics/kinematics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extern int kinematicsSwitch(int switchkins_type);
165165

166166
#define KINS_NOT_SWITCHABLE \
167167
extern int kinematicsSwitchable() {return 0;} \
168-
extern int kinematicsSwitch(int switchkins_type) {return 0;} \
168+
extern int kinematicsSwitch(int switchkins_type) { (void)switchkins_type; return 0;} \
169169
EXPORT_SYMBOL(kinematicsSwitchable); \
170170
EXPORT_SYMBOL(kinematicsSwitch);
171171

src/emc/kinematics/kins_util.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ int identityKinematicsSetup(const int comp_id,
283283
const char* coordinates,
284284
kparms* kp)
285285
{
286+
(void)comp_id;
286287
int axis_idx_for_jno[EMCMOT_MAX_JOINTS];
287288
int jno;
288289
int show=0;
@@ -330,6 +331,8 @@ int identityKinematicsForward(const double *joints,
330331
const KINEMATICS_FORWARD_FLAGS * fflags,
331332
KINEMATICS_INVERSE_FLAGS * iflags)
332333
{
334+
(void)fflags;
335+
(void)iflags;
333336
if (!identity_kinematics_initialized) {
334337
rtapi_print_msg(RTAPI_MSG_ERR,
335338
"identityKinematicsForward: not initialized\n");
@@ -346,6 +349,8 @@ int identityKinematicsInverse(const EmcPose * pos,
346349
const KINEMATICS_INVERSE_FLAGS * iflags,
347350
KINEMATICS_FORWARD_FLAGS * fflags)
348351
{
352+
(void)iflags;
353+
(void)fflags;
349354
if (!identity_kinematics_initialized) {
350355
rtapi_print_msg(RTAPI_MSG_ERR,
351356
"identityKinematicsInverse: not initialized\n");

src/emc/kinematics/lineardeltakins.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ int kinematicsForward(const double * joints,
3232
EmcPose * pos,
3333
const KINEMATICS_FORWARD_FLAGS * fflags,
3434
KINEMATICS_INVERSE_FLAGS * iflags) {
35+
(void)fflags;
36+
(void)iflags;
3537
set_geometry(*haldata->r, *haldata->l);
3638
return kinematics_forward(joints, pos);
3739
}
3840

3941
int kinematicsInverse(const EmcPose *pos, double *joints,
4042
const KINEMATICS_INVERSE_FLAGS *iflags,
4143
KINEMATICS_FORWARD_FLAGS *fflags) {
44+
(void)iflags;
45+
(void)fflags;
4246
set_geometry(*haldata->r, *haldata->l);
4347
return kinematics_inverse(pos, joints);
4448
}

src/emc/kinematics/maxkins.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ int kinematicsForward(const double *joints,
3939
const KINEMATICS_FORWARD_FLAGS * fflags,
4040
KINEMATICS_INVERSE_FLAGS * iflags)
4141
{
42+
(void)fflags;
43+
(void)iflags;
4244
// B correction
4345
double zb = (*(haldata->pivot_length) + joints[8]) * cos(d2r(joints[4]));
4446
double xb = (*(haldata->pivot_length) + joints[8]) * sin(d2r(joints[4]));
@@ -72,6 +74,8 @@ int kinematicsInverse(const EmcPose * pos,
7274
const KINEMATICS_INVERSE_FLAGS * iflags,
7375
KINEMATICS_FORWARD_FLAGS * fflags)
7476
{
77+
(void)iflags;
78+
(void)fflags;
7579
// B correction
7680
double zb = (*(haldata->pivot_length) + pos->w) * cos(d2r(pos->b));
7781
double xb = (*(haldata->pivot_length) + pos->w) * sin(d2r(pos->b));

src/emc/kinematics/pentakins.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ int kinematicsForward(const double * joints,
242242
const KINEMATICS_FORWARD_FLAGS * fflags,
243243
KINEMATICS_INVERSE_FLAGS * iflags)
244244
{
245+
(void)fflags;
246+
(void)iflags;
245247

246248
// PmCartesian aw;
247249
// PmCartesian InvKinStrutVect,InvKinStrutVectUnit;
@@ -260,7 +262,7 @@ int kinematicsForward(const double * joints,
260262

261263
int iterate = 1;
262264
int i, j;
263-
int iteration = 0;
265+
unsigned iteration = 0;
264266

265267
pentakins_read_hal_pins();
266268

@@ -372,6 +374,8 @@ int kinematicsInverse(const EmcPose * pos,
372374
const KINEMATICS_INVERSE_FLAGS * iflags,
373375
KINEMATICS_FORWARD_FLAGS * fflags)
374376
{
377+
(void)iflags;
378+
(void)fflags;
375379

376380
double coord[NUM_STRUTS];
377381

src/emc/kinematics/pumakins.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static int pumaKinematicsForward(const double * joint,
4040
const KINEMATICS_FORWARD_FLAGS * fflags,
4141
KINEMATICS_INVERSE_FLAGS * iflags)
4242
{
43+
(void)fflags;
4344
double s1, s2, s3, s4, s5, s6;
4445
double c1, c2, c3, c4, c5, c6;
4546
double s23;
@@ -328,6 +329,7 @@ int pumaKinematicsSetup(const int comp_id,
328329
const char* coordinates,
329330
kparms* kp)
330331
{
332+
(void)coordinates;
331333
int res=0;
332334

333335
haldata = hal_malloc(sizeof(*haldata));

0 commit comments

Comments
 (0)