mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-18 13:59:34 +08:00
fix warnings
This commit is contained in:
parent
a94c75d6b7
commit
74488ba47f
@ -82,7 +82,10 @@ void get_fake_random_chars(char * s,int len)
|
|||||||
|
|
||||||
while(left>=(int)sizeof(u64_t))
|
while(left>=(int)sizeof(u64_t))
|
||||||
{
|
{
|
||||||
*((u64_t*)p)=my_random.gen64(); //no endianess problem here , but may break strict-alias?
|
//*((u64_t*)p)=my_random.gen64(); //this may break strict-alias , also p may not point to a multiple of sizeof(u64_t)
|
||||||
|
|
||||||
|
u64_t tmp=my_random.gen64();
|
||||||
|
memcpy(p,&tmp,sizeof(u64_t)); // so,use memcpy instead.
|
||||||
|
|
||||||
p+=sizeof(u64_t);
|
p+=sizeof(u64_t);
|
||||||
left-=sizeof(u64_t);
|
left-=sizeof(u64_t);
|
||||||
|
4
makefile
4
makefile
@ -6,9 +6,9 @@ cc_mips24kc_le=/toolchains/lede-sdk-17.01.2-ramips-mt7621_gcc-5.4.0_musl-1.1.16.
|
|||||||
#cc_arm= /toolchains/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-g++ -march=armv6 -marm
|
#cc_arm= /toolchains/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-g++ -march=armv6 -marm
|
||||||
cc_arm= /toolchains/arm-2014.05/bin/arm-none-linux-gnueabi-g++
|
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 -Wno-strict-aliasing -Wno-comment
|
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 -Ilibev
|
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
|
||||||
|
|
||||||
NAME=speederv2
|
NAME=speederv2
|
||||||
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
||||||
|
10
my_ev.cpp
10
my_ev.cpp
@ -1,5 +1,15 @@
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
|
|
||||||
|
#pragma GCC diagnostic ignored "-Wextra"
|
||||||
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
#pragma GCC diagnostic ignored "-Wcomment"
|
||||||
|
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
|
|
||||||
|
#pragma GCC diagnostic ignored "-Wall"
|
||||||
|
#pragma GCC diagnostic ignored "-W"
|
||||||
|
|
||||||
#include "my_ev_common.h"
|
#include "my_ev_common.h"
|
||||||
#include "ev.c"
|
#include "ev.c"
|
||||||
|
|
||||||
|
3
my_ev.h
3
my_ev.h
@ -1,6 +1,5 @@
|
|||||||
#pragma GCC diagnostic push
|
#pragma once
|
||||||
|
|
||||||
#include "my_ev_common.h"
|
#include "my_ev_common.h"
|
||||||
#include "ev.h"
|
#include "ev.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wextra"
|
|
||||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
|
||||||
#pragma GCC diagnostic ignored "-Wcomment"
|
|
||||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
|
||||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-value"
|
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wall"
|
|
||||||
#pragma GCC diagnostic ignored "-W"
|
|
||||||
|
|
||||||
|
|
||||||
#define EV_STANDALONE 1
|
#define EV_STANDALONE 1
|
||||||
#define EV_COMMON void *data; unsigned long long u64;
|
#define EV_COMMON void *data; unsigned long long u64;
|
||||||
#define EV_COMPAT3 0
|
#define EV_COMPAT3 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user