|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
1 B/ ?4 |8 y9 M' `& i1,warning Deprecated declaration/函数/ - give arg types' ?) D+ f2 b3 J. a3 R$ M7 t
5 g* |8 Y2 O3 R( |( O4 t
该函数如果没有参数就要在括号里加“void”
: L5 T; P) d: m2 ~5 @( X* t3 g! B. V: g
例如:函数定义% l' K; ]- P, z7 h! p7 P
. q5 Z c' j- ?. _2 u0 Uvoid TP_GetAdXY()3 l3 e- N2 h) k; Z
{
) r3 k* q- V- ]8 K, D5 g/ } int adx,ady;! ?/ Q+ r4 i% _3 o e. u- ]- `& s
adx=Read_X();0 F. |" l3 e8 K
ady=Read_Y();" Y2 c6 J5 l3 u3 g
//*x=adx;
6 m4 }: S% e6 b) j" L //*y=ady;
# r0 J. a/ r [/ }" b Lcd_ColorBox(adx,ady,adx+10,adx+10,Red);
0 r' A3 y+ u. j" ^) \}
5 C) d4 L+ j- A3 T% h: r @6 L1 E
2 n& B% x, P4 b/ M" ~4 G# w; E: d; E函数声明
2 B$ ?( Q- v8 J$ ~# [) I+ ]$ I( i. |, H5 E* y
void TP_GetAdXY();1 e. @, P7 f8 q' i+ s5 x
3 _. I9 a- R4 N, P
就会出现下面警告2 z, q$ E1 m5 ]2 s! p5 f! j
; @ i2 G3 j* L* h. j* k
USER\ADS7843.h(77): warning: #1295-D: Deprecated declaration TP_GetAdXY - give arg types- \: k0 y6 g. K. l2 W
( T% Y# X# U$ l' f) S- w; h" j& x, h% }( B
如果是下边这样的话就不会出现警告$ {. T7 X2 z, l" x7 G. J: {% o' I
0 l- W6 M& @4 {: e- a W c& M% Z% M3 K
void TP_GetAdXY(void)
5 R/ I/ {% {/ ?* R. J/ c{8 F' K. L) Z) h5 V. {
int adx,ady;
* G# P* `2 G( G3 c* y# C adx=Read_X();$ M' d, ]0 u# b
ady=Read_Y();
# y7 T! D4 W8 i //*x=adx;* g! }, }" J8 `2 d' y) |. N$ y
//*y=ady;' v# H" K2 q( _# {4 s& J M
Lcd_ColorBox(adx,ady,adx+10,adx+10,Red);
& x, b6 U9 `8 F9 z, X* `; X}
u9 X$ M. i: }
2 s2 I/ J6 T! }, U函数声明& Q8 h4 i$ Q B* U( j* ]: J
5 O% O7 ~6 q3 B0 S9 Y1 p" A/ R) A
void TP_GetAdXY(void);
" t- _8 ]' Z, z j# s) n& o% Q9 F( k
2 }+ F6 s* G+ w5 j/ q$ d/ c* n4 u 5 q# J; C% H' `$ R9 L
; |/ O9 K! e1 }$ X0 T4 R2 f6 F2,USER\main.c(39): warning: #223-D: function "TP_GetAdXY" declared implicitly
7 v4 X% p4 k1 m0 P8 u& d- v& |: F5 X2 k5 F
函数没有声明4 f) h/ g4 s0 ^! h1 y
5 \: t8 `1 ^2 I1 N1 v
在使用函数之前一定要声明1 x& D7 Q0 [% N) ~& O
- P3 u3 z/ e" F2 C' r' h
9 M& E. j+ [9 I6 ?
$ x! p2 W% ^- j) f1 P5 o+ x
( A% P: \0 R2 m% M7 `& S& x- [
5 s& V o; \* q/ a& Q7 f$ X3,No space in execution regions with .ANY selector matching Section HEAP(startup.o)
- p: |8 k J3 v+ G: F( k; K" E9 q+ n" j$ M+ G
! ? M t3 k7 i
" @: m |5 p! ?
ROM和RAM区域不正确+ \7 L# A7 j/ a0 R
1 @6 t* n5 ~3 x: |" x: }
, C. C( t, N N9 Z. W n
0 S% l8 y4 K8 X& Z$ K8 J1 f$ w- a5 t4,warning: #1-D: last line of file ends without a newline) f/ j) q& E) ^' j7 t; @; g
$ u9 T' P v x # h" [! C" m0 a
5 n2 T5 a# ?; L: o
在最后一行加个回车 |
|