Bonjour tout le monde,
j'ai reussi a avoir un programme "stable" dans les premières etapes de ce dernier.
cependant mon programme ne fais pas exactement ce que je desire, comme il me reste encors des Warnings il ce peut que cela s'explique.
je vous mets mes Warnings
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Microchip MPLAB C30 License Manager Version v3.01 (Build Date Jun 11 2007). Copyright (c) 2005 Microchip Technology Inc. All rights reserved. The MPLAB C30 license has less than 14 days remaining. 26_09_2007.c: In function 'lcp_rx_handler': 26_09_2007.c:2367: warning: passing argument 1 of 'get_lword' from incompatible pointer type 26_09_2007.c:2370: warning: passing argument 1 of 'put_lword' from incompatible pointer type 26_09_2007.c: In function 'ipcp_rx_handler': 26_09_2007.c:2475: warning: passing argument 1 of 'get_lword' from incompatible pointer type 26_09_2007.c:2498: warning: passing argument 1 of 'put_lword' from incompatible pointer type 26_09_2007.c:2509: warning: passing argument 1 of 'put_lword' from incompatible pointer type 26_09_2007.c:2517: warning: passing argument 1 of 'get_lword' from incompatible pointer type 26_09_2007.c: In function 'do_ipcp_actions': 26_09_2007.c:2582: warning: passing argument 1 of 'put_lword' from incompatible pointer type 26_09_2007.c: In function 'pap_rx_handler': 26_09_2007.c:2606: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness 26_09_2007.c: In function 'pap_event_handler': 26_09_2007.c:2635: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness 26_09_2007.c:2637: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 BYTE clientname[12]="xxxxx"; BYTE clientpass[12]="xxxxxx"; BYTE serverid[] = "xxxxxxx"; static DWORD hostip; static DWORD myip; typedef union { unsigned long lw; BYTE b[4]; } LWORD; BOOL get_lword(LWORD *lwp) { BYTE n=4, b; #ifdef HI_TECH_C while (n && get_byte(&b)) lwp->b[--n] = b; return(n==0); #else if (get_byte(&lwp->b[3]) && get_byte(&lwp->b[2]) && get_byte(&lwp->b[1]) && get_byte(&lwp->b[0])) return(1); return(0); #endif } void put_lword(LWORD *lwp) { put_byte(lwp->b[3]); put_byte(lwp->b[2]); put_byte(lwp->b[1]); put_byte(lwp->b[0]); } void lcp_rx_handler(void) { ... ====> if ((lcp_state&0xf) == PPP_OPENED && get_lword(&lw)) { // Get magic num lw++; // Return magic num + 1 =======> put_lword(&lw); copy_rx_tx(net_rxin-rxout); // Echo the data send_ppp(PPP_ECHO_REP, ppp_rxid, 1); } // Others to state machine.. ... } void pap_event_handler(BYTE event) { ..... if (client_auth) // If client authentication.. { setpos_txin(PPP_HEADLEN); // ..send ID and password ======> put_byte(strlen(clientname)); putrsUART(clientname); ======> put_byte(strlen(clientpass)); putrsUART(clientpass); send_ppp(PPP_CFG_REQ, ppp_txid, 1); } .... }
j'essais de resoudre c'est warning mais... rien !!!
pour les premiers warning ce n'est juste qu'une question de TYPE non ?
mais pour les derniers je comprend pas trop.
merci encors pour votre aide
Partager