greensea / mptunnel

MPUDP Tunnel (User space MultiPath UDP)
BSD 2-Clause "Simplified" License
174 stars 31 forks source link

Compilation warnings #5

Open zoobab opened 8 years ago

zoobab commented 8 years ago

Hi,

I am compiling under Ubuntu Xenial, and I have the following warning:

root@66b927f180e1 /root/mptunnel [25]# make
gcc -MT "mptunnel.o mptunnel.d" -MM -g -Wall -I/usr/include/libev mptunnel.c > mptunnel.d
gcc -MT "server.o server.d" -MM -g -Wall -I/usr/include/libev server.c > server.d
gcc -MT "client.o client.d" -MM -g -Wall -I/usr/include/libev client.c > client.d
gcc -MT "net.o net.d" -MM -g -Wall -I/usr/include/libev net.c > net.d
gcc -MT "rbtree.o rbtree.d" -MM -g -Wall -I/usr/include/libev rbtree.c > rbtree.d
gcc -g -Wall -I/usr/include/libev   -c -o client.o client.c
gcc -g -Wall -I/usr/include/libev   -c -o net.o net.c
gcc -g -Wall -I/usr/include/libev   -c -o mptunnel.o mptunnel.c
gcc -g -Wall -I/usr/include/libev   -c -o rbtree.o rbtree.c
gcc client.o net.o mptunnel.o rbtree.o  -o mpclient -g  -lev -pthread
gcc server.c mptunnel.o net.o rbtree.o  -o mpserver -g  -lev -pthread
In file included from server.c:20:0:
server.c: In function 'send_to_servers':
server.c:220:14: warning: too many arguments for format [-Wformat-extra-args]
         LOGI("要发送的数据大小为 %d 字节,超过最大包大小,将该包拆分为两个小包后再尝试发送\n", buflen, MAX_PACKET_SIZE);
              ^
mptunnel.h:50:134: note: in definition of macro 'LOG'
     fputc('[', stderr); fputs(timestr, stderr); fputs("]", stderr); fprintf(stderr, "(%s:%d) ", __FILE__, __LINE__); fprintf(stderr, FMT, ##__VA_ARGS__); \
                                                                                                                                      ^
server.c:220:9: note: in expansion of macro 'LOGI'
         LOGI("要发送的数据大小为 %d 字节,超过最大包大小,将该包拆分为两个小包后再尝试发送\n", buflen, MAX_PACKET_SIZE);
         ^

My chinese is inexistant, would it be possible to have those in english?

greensea commented 8 years ago

Warning fixed. The chinese means: Try to send a packet of %d bytes which exceeds max packet size, packet will be split to two packets before send.