Skip to content

Commit 5133dac

Browse files
committed
Fix -Wextra warnings in components.
1 parent bd2c432 commit 5133dac

100 files changed

Lines changed: 195 additions & 33 deletions

Some content is hidden

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

src/hal/components/abs.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pin out bit sign "Sign of input, false for positive, true for negative" ;
2121
pin out bit is_positive "TRUE if input is positive, FALSE if input is 0 or negative";
2222
pin out bit is_negative "TRUE if input is negative, FALSE if input is 0 or positive";
2323

24+
option period no;
2425
function _;
2526
license "GPL";
2627
author "John Kasunich";

src/hal/components/abs_s32.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pin out bit sign "Sign of input, false for positive, true for negative" ;
2121
pin out bit is_positive "TRUE if input is positive, FALSE if input is 0 or negative";
2222
pin out bit is_negative "TRUE if input is negative, FALSE if input is 0 or positive";
2323

24+
option period no;
2425
function _ nofp;
2526
license "GPL";
2627
author "Sebastian Kuzminsky";

src/hal/components/abs_s64.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pin out bit sign "Sign of input, false for positive, true for negative" ;
2323
pin out bit is_positive "true if input is positive, false if input is 0 or negative";
2424
pin out bit is_negative "true if input is negative, false if input is 0 or positive";
2525

26+
option period no;
2627
function _ nofp;
2728
license "GPL";
2829
author "ArcEye based on code from Sebastian Kuzminsky";

src/hal/components/and2.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Otherwise,
1414
\\fBout=FALSE\\fR
1515
.RE"""
1616
;
17+
option period no;
1718
function _ nofp;
1819
see_also """
1920
\\fBlogic\\fR(9),

src/hal/components/bin2gray.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pin in unsigned in "binary code in";
44
pin out unsigned out "gray code out";
55
license "GPL";
66
author "Andy Pugh";
7+
option period no;
78
function _ nofp;
89
;;
910
out = (in >> 1) ^ in;

src/hal/components/biquad.comp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ typedef struct {
9898

9999
EXTRA_SETUP()
100100
{
101+
(void)prefix;
102+
(void)extra_arg;
101103
data.lastEnable = 0;
102104

103105
return(0);

src/hal/components/bitslice.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ author "Andy Pugh";
99
license "GPL2+";
1010
function _ nofp;
1111
option personality yes;
12+
option period no;
1213
;;
1314
int i;
1415
for (i = 0; i < personality ; i++){

src/hal/components/bitwise.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pin out u32 out-xnor "The inverse of the bitwise XOR";
1111
author "Andy Pugh";
1212
license "GPL 2+";
1313
function _ nofp;
14+
option period no;
1415
;;
1516

1617
out_and = (in0 & in1);

src/hal/components/bldc.comp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ FUNCTION(_) {
515515
phase_angle -= floor(phase_angle);
516516

517517
if (! (ph & old_ph)){ hall_error = 1;}
518-
if (pattern != old_pattern){hall_error = 0;}
518+
if (pattern != (unsigned)old_pattern){hall_error = 0;}
519519

520520
if (force_trap) break;
521521

@@ -797,7 +797,7 @@ FUNCTION(_) {
797797
return;
798798

799799
case 0x400: // Hall Output
800-
for (i = 0; P[(output_pattern << 3) + i] != ph && i < 8 ; i++) {}
800+
for (i = 0; P[(output_pattern << 3) + i] != ((unsigned)ph & 0xff) && i < 8 ; i++) {}
801801
hall1_out = (i & 0x04);
802802
hall2_out = (i & 0x02);
803803
hall3_out = (i & 0x01);
@@ -849,6 +849,7 @@ FUNCTION(_) {
849849
}
850850

851851
EXTRA_SETUP(){
852+
(void)prefix;
852853
int i;
853854
char c;
854855
for (i = 0; cfg[extra_arg][i] != 0 && i < NUM_TAG ; i++){

src/hal/components/blend.comp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pin out float out "Output value.";
2424

2525
param rw bit open "If true, select values outside the range 0.0 to 1.0 give values outside the range in2 to in1. If false, outputs are clamped to the the range in2 to in1";
2626

27+
option period no;
2728
function _;
2829
license "GPL";
2930
author "Jeff Epler";

0 commit comments

Comments
 (0)