diff --git a/Makefile b/Makefile index 54acceb0..2dce0e01 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ LDFLAGS=-lrt -lpcap -lsodium -CPPFLAGS=-Wall -g +CPPFLAGS=-Wall -O2 all: rx tx keygen diff --git a/tx.cpp b/tx.cpp index d2c79ce4..efe18459 100644 --- a/tx.cpp +++ b/tx.cpp @@ -333,7 +333,7 @@ int main(int argc, char * const *argv) fprintf(stderr, "Usage: %s [-K tx_key] [-m mavlink_agg_in_ms] [-k RS_K] [-n RS_N] [-u udp_port] [-p radio_port] interface\n", argv[0]); fprintf(stderr, "Default: K='%s', k=%d, n=%d, udp_port=%d, radio_port=%d\n", keypair.c_str(), k, n, udp_port, radio_port); - fprintf(stderr, "Radio MTU: %lu\n", MAX_PAYLOAD_SIZE); + fprintf(stderr, "Radio MTU: %lu\n", (unsigned long)MAX_PAYLOAD_SIZE); exit(1); } } diff --git a/wifibroadcast.hpp b/wifibroadcast.hpp index 941afb7b..1eb914a1 100644 --- a/wifibroadcast.hpp +++ b/wifibroadcast.hpp @@ -104,7 +104,7 @@ static uint8_t ieee80211_header[] = { // nonce: 56bit block_idx + 8bit fragment_idx -#define BLOCK_IDX_MASK ((1LU << 56) - 1) +#define BLOCK_IDX_MASK ((1LLU << 56) - 1) #define WFB_PACKET_DATA 0x1 #define WFB_PACKET_KEY 0x2