Skip to content

Commit fb22edc

Browse files
author
Sebastien Bourdeauducq
committedFeb 7, 2012
software: enable -Wmissing-prototypes
1 parent 63f6dec commit fb22edc

File tree

5 files changed

+35
-16
lines changed

5 files changed

+35
-16
lines changed
 

‎software/bios/isr.c

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <irq.h>
2121
#include <uart.h>
2222

23+
void isr(void);
2324
void isr(void)
2425
{
2526
unsigned int irqs;

‎software/include.mak

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ endif
3838
INCLUDES_NOLIBC ?= -nostdinc -I$(M2DIR)/software/include/base
3939
INCLUDES = $(INCLUDES_NOLIBC) -I$(M2DIR)/software/include -I$(M2DIR)/tools
4040
ASFLAGS = $(INCLUDES) -nostdinc
41-
# later: -Wmissing-prototypes
4241
CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
43-
-fsigned-char $(INCLUDES)
42+
-Wmissing-prototypes -fsigned-char $(INCLUDES)
4443
LDFLAGS = -nostdlib -nodefaultlibs
4544

4645
# compile and generate dependencies, based on

‎software/libbase/divsi3.c

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#define exitdiv(sign, res) if (sign) { res = - res;} return res;
2121

22+
long __divsi3 (long numerator, long denominator);
2223
long __divsi3 (long numerator, long denominator)
2324
{
2425
int sign;
@@ -30,6 +31,7 @@ long __divsi3 (long numerator, long denominator)
3031
exitdiv(sign, dividend);
3132
}
3233

34+
long __modsi3 (long numerator, long denominator);
3335
long __modsi3 (long numerator, long denominator)
3436
{
3537
int sign;

‎software/libbase/softfloat-glue.c

+23-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18+
#include "milieu.h"
1819
#include "softfloat.h"
1920

2021
/*
2122
* 'Equal' wrapper. This returns 0 if the numbers are equal, or (1 | -1)
2223
* otherwise. So we need to invert the output.
2324
*/
24-
int __eqsf2(float32 a, float32 b)
25+
flag __eqsf2(float32 a, float32 b);
26+
flag __eqsf2(float32 a, float32 b)
2527
{
2628
return !float32_eq(a, b);
2729
}
@@ -32,7 +34,8 @@ int __eqsf2(float32 a, float32 b)
3234
* to use an 'equal' call and invert the result. The result is already
3335
* inverted though! Confusing?!
3436
*/
35-
int __nesf2(float32 a, float32 b)
37+
flag __nesf2(float32 a, float32 b);
38+
flag __nesf2(float32 a, float32 b)
3639
{
3740
return !float32_eq(a, b);
3841
}
@@ -44,7 +47,8 @@ int __nesf2(float32 a, float32 b)
4447
* make up our mind. This means that we can call 'less than or equal' and
4548
* invert the result.
4649
*/
47-
int __gtsf2(float32 a, float32 b)
50+
flag __gtsf2(float32 a, float32 b);
51+
flag __gtsf2(float32 a, float32 b)
4852
{
4953
return !float32_le(a, b);
5054
}
@@ -53,23 +57,26 @@ int __gtsf2(float32 a, float32 b)
5357
* 'Greater Than or Equal' wrapper. We emulate this by inverting the result
5458
* of a 'less than' call.
5559
*/
56-
int __gesf2(float32 a, float32 b)
60+
flag __gesf2(float32 a, float32 b);
61+
flag __gesf2(float32 a, float32 b)
5762
{
5863
return !float32_lt(a, b);
5964
}
6065

6166
/*
6267
* 'Less Than' wrapper.
6368
*/
64-
int __ltsf2(float32 a, float32 b)
69+
flag __ltsf2(float32 a, float32 b);
70+
flag __ltsf2(float32 a, float32 b)
6571
{
6672
return float32_lt(a, b);
6773
}
6874

6975
/*
7076
* 'Less Than or Equal' wrapper. A 0 must turn into a 1, and a 1 into a 0.
7177
*/
72-
int __lesf2(float32 a, float32 b)
78+
flag __lesf2(float32 a, float32 b);
79+
flag __lesf2(float32 a, float32 b)
7380
{
7481
return !float32_le(a, b);
7582
}
@@ -80,6 +87,7 @@ int __lesf2(float32 a, float32 b)
8087
* position in the registers of arguments, the double precision version can
8188
* go here too ;-)
8289
*/
90+
float32 __negsf2(float32 x);
8391
float32 __negsf2(float32 x)
8492
{
8593
return x ^ 0x80000000;
@@ -88,42 +96,50 @@ float32 __negsf2(float32 x)
8896
/*
8997
* 32-bit operations.
9098
*/
99+
float32 __addsf3(float32 a, float32 b);
91100
float32 __addsf3(float32 a, float32 b)
92101
{
93102
return float32_add(a, b);
94103
}
95104

105+
float32 __subsf3(float32 a, float32 b);
96106
float32 __subsf3(float32 a, float32 b)
97107
{
98108
return float32_sub(a, b);
99109
}
100110

111+
float32 __mulsf3(float32 a, float32 b);
101112
float32 __mulsf3(float32 a, float32 b)
102113
{
103114
return float32_mul(a, b);
104115
}
105116

117+
float32 __divsf3(float32 a, float32 b);
106118
float32 __divsf3(float32 a, float32 b)
107119
{
108120
return float32_div(a, b);
109121
}
110122

123+
float32 __floatsisf(int x);
111124
float32 __floatsisf(int x)
112125
{
113126
return int32_to_float32(x);
114127
}
115128

129+
int __fixsfsi(float32 x);
116130
int __fixsfsi(float32 x)
117131
{
118132
return float32_to_int32_round_to_zero(x);
119133
}
120134

135+
unsigned int __fixunssfsi(float32 x);
121136
unsigned int __fixunssfsi(float32 x)
122137
{
123138
return float32_to_int32_round_to_zero(x); // XXX
124139
}
125140

126-
int __unordsf2(float32 a, float32 b)
141+
flag __unordsf2(float32 a, float32 b);
142+
flag __unordsf2(float32 a, float32 b)
127143
{
128144
/*
129145
* The comparison is unordered if either input is a NaN.

‎software/libbase/softfloat.h

+8-7
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ float32 float32_mul( float32, float32 );
109109
float32 float32_div( float32, float32 );
110110
float32 float32_rem( float32, float32 );
111111
float32 float32_sqrt( float32 );
112-
int float32_eq( float32, float32 );
113-
int float32_le( float32, float32 );
114-
int float32_lt( float32, float32 );
115-
int float32_eq_signaling( float32, float32 );
116-
int float32_le_quiet( float32, float32 );
117-
int float32_lt_quiet( float32, float32 );
118-
int float32_is_signaling_nan( float32 );
112+
flag float32_eq( float32, float32 );
113+
flag float32_le( float32, float32 );
114+
flag float32_lt( float32, float32 );
115+
flag float32_eq_signaling( float32, float32 );
116+
flag float32_le_quiet( float32, float32 );
117+
flag float32_lt_quiet( float32, float32 );
118+
flag float32_is_nan( float32 a );
119+
flag float32_is_signaling_nan( float32 );
119120

0 commit comments

Comments
 (0)
Please sign in to comment.