mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-19 06:19:34 +08:00
fix warnings
This commit is contained in:
parent
74488ba47f
commit
c5a52cdb6e
@ -318,9 +318,9 @@ void setnonblocking(int sock) {
|
|||||||
Generic checksum calculation function
|
Generic checksum calculation function
|
||||||
*/
|
*/
|
||||||
unsigned short csum(const unsigned short *ptr,int nbytes) {
|
unsigned short csum(const unsigned short *ptr,int nbytes) {
|
||||||
register long sum;
|
long sum;
|
||||||
unsigned short oddbyte;
|
unsigned short oddbyte;
|
||||||
register short answer;
|
short answer;
|
||||||
|
|
||||||
sum=0;
|
sum=0;
|
||||||
while(nbytes>1) {
|
while(nbytes>1) {
|
||||||
@ -343,9 +343,9 @@ unsigned short csum(const unsigned short *ptr,int nbytes) {
|
|||||||
|
|
||||||
unsigned short tcp_csum(const pseudo_header & ph,const unsigned short *ptr,int nbytes) {//works both for big and little endian
|
unsigned short tcp_csum(const pseudo_header & ph,const unsigned short *ptr,int nbytes) {//works both for big and little endian
|
||||||
|
|
||||||
register long sum;
|
long sum;
|
||||||
unsigned short oddbyte;
|
unsigned short oddbyte;
|
||||||
register short answer;
|
short answer;
|
||||||
|
|
||||||
sum=0;
|
sum=0;
|
||||||
unsigned short * tmp= (unsigned short *)&ph;
|
unsigned short * tmp= (unsigned short *)&ph;
|
||||||
|
@ -195,7 +195,7 @@ static gf gf_mul_table[GF_SIZE + 1][GF_SIZE + 1];
|
|||||||
|
|
||||||
#define gf_mul(x,y) gf_mul_table[x][y]
|
#define gf_mul(x,y) gf_mul_table[x][y]
|
||||||
|
|
||||||
#define USE_GF_MULC register gf * __gf_mulc_
|
#define USE_GF_MULC gf * __gf_mulc_
|
||||||
#define GF_MULC0(c) __gf_mulc_ = gf_mul_table[c]
|
#define GF_MULC0(c) __gf_mulc_ = gf_mul_table[c]
|
||||||
#define GF_ADDMULC(dst, x) dst ^= __gf_mulc_[x]
|
#define GF_ADDMULC(dst, x) dst ^= __gf_mulc_[x]
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ gf_mul(x,y)
|
|||||||
}
|
}
|
||||||
#define init_mul_table()
|
#define init_mul_table()
|
||||||
|
|
||||||
#define USE_GF_MULC register gf * __gf_mulc_
|
#define USE_GF_MULC gf * __gf_mulc_
|
||||||
#define GF_MULC0(c) __gf_mulc_ = &gf_exp[ gf_log[c] ]
|
#define GF_MULC0(c) __gf_mulc_ = &gf_exp[ gf_log[c] ]
|
||||||
#define GF_ADDMULC(dst, x) { if (x) dst ^= __gf_mulc_[ gf_log[x] ] ; }
|
#define GF_ADDMULC(dst, x) { if (x) dst ^= __gf_mulc_[ gf_log[x] ] ; }
|
||||||
#endif
|
#endif
|
||||||
@ -341,7 +341,7 @@ static void
|
|||||||
addmul1(gf *dst1, gf *src1, gf c, int sz)
|
addmul1(gf *dst1, gf *src1, gf c, int sz)
|
||||||
{
|
{
|
||||||
USE_GF_MULC ;
|
USE_GF_MULC ;
|
||||||
register gf *dst = dst1, *src = src1 ;
|
gf *dst = dst1, *src = src1 ;
|
||||||
gf *lim = &dst[sz - UNROLL + 1] ;
|
gf *lim = &dst[sz - UNROLL + 1] ;
|
||||||
|
|
||||||
GF_MULC0(c) ;
|
GF_MULC0(c) ;
|
2
makefile
2
makefile
@ -8,7 +8,7 @@ cc_arm= /toolchains/arm-2014.05/bin/arm-none-linux-gnueabi-g++
|
|||||||
#cc_bcm2708=/home/wangyu/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
|
#cc_bcm2708=/home/wangyu/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
|
||||||
FLAGS= -std=c++11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers
|
FLAGS= -std=c++11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers
|
||||||
|
|
||||||
SOURCES=main.cpp log.cpp common.cpp lib/fec.c lib/rs.c packet.cpp delay_manager.cpp fd_manager.cpp connection.cpp fec_manager.cpp misc.cpp tunnel_client.cpp tunnel_server.cpp my_ev.cpp -isystem libev
|
SOURCES=main.cpp log.cpp common.cpp lib/fec.cpp lib/rs.cpp packet.cpp delay_manager.cpp fd_manager.cpp connection.cpp fec_manager.cpp misc.cpp tunnel_client.cpp tunnel_server.cpp my_ev.cpp -isystem libev
|
||||||
|
|
||||||
NAME=speederv2
|
NAME=speederv2
|
||||||
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
||||||
|
Loading…
x
Reference in New Issue
Block a user