Skip to content

Commit c00f4ca

Browse files
committed
Fix printf warnings
1 parent 73af6d7 commit c00f4ca

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/rx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ int main(int argc, char* const *argv)
869869
fprintf(stderr, "Local receiver: %s [-K rx_key] [-k RS_K] [-n RS_N] [-c client_addr] [-u client_port] [-p radio_port] [-l log_interval] [-e epoch] [-i link_id] interface1 [interface2] ...\n", argv[0]);
870870
fprintf(stderr, "Remote (forwarder): %s -f [-c client_addr] [-u client_port] [-p radio_port] [-i link_id] interface1 [interface2] ...\n", argv[0]);
871871
fprintf(stderr, "Remote (aggregator): %s -a server_port [-K rx_key] [-k RS_K] [-n RS_N] [-c client_addr] [-u client_port] [-l log_interval] [-p radio_port] [-e epoch] [-i link_id]\n", argv[0]);
872-
fprintf(stderr, "Default: K='%s', k=%d, n=%d, connect=%s:%d, link_id=0x%06x, radio_port=%u, epoch=%lu, log_interval=%d\n", keypair.c_str(), k, n, client_addr.c_str(), client_port, link_id, radio_port, epoch, log_interval);
872+
fprintf(stderr, "Default: K='%s', k=%d, n=%d, connect=%s:%d, link_id=0x%06x, radio_port=%u, epoch=%" PRIu64 ", log_interval=%d\n", keypair.c_str(), k, n, client_addr.c_str(), client_port, link_id, radio_port, epoch, log_interval);
873873
fprintf(stderr, "WFB-ng version " WFB_VERSION "\n");
874874
fprintf(stderr, "WFB-ng home page: <http://wfb-ng.org>\n");
875875
exit(1);

src/tx.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <assert.h>
3030
#include <sys/ioctl.h>
3131
#include <linux/random.h>
32+
#include <inttypes.h>
3233

3334
#include <string>
3435
#include <memory>
@@ -393,7 +394,7 @@ int main(int argc, char * const *argv)
393394
show_usage:
394395
fprintf(stderr, "Usage: %s [-K tx_key] [-k RS_K] [-n RS_N] [-u udp_port] [-p radio_port] [-B bandwidth] [-G guard_interval] [-S stbc] [-L ldpc] [-M mcs_index] [-T poll_timeout] [-e epoch] [-i link_id] interface1 [interface2] ...\n",
395396
argv[0]);
396-
fprintf(stderr, "Default: K='%s', k=%d, n=%d, udp_port=%d, link_id=0x%06x, radio_port=%u, epoch=%lu, bandwidth=%d guard_interval=%s stbc=%d ldpc=%d mcs_index=%d, poll_timeout=%d\n",
397+
fprintf(stderr, "Default: K='%s', k=%d, n=%d, udp_port=%d, link_id=0x%06x, radio_port=%u, epoch=%" PRIu64 ", bandwidth=%d guard_interval=%s stbc=%d ldpc=%d mcs_index=%d, poll_timeout=%d\n",
397398
keypair.c_str(), k, n, udp_port, link_id, radio_port, epoch, bandwidth, short_gi ? "short" : "long", stbc, ldpc, mcs_index, poll_timeout);
398399
fprintf(stderr, "Radio MTU: %lu\n", (unsigned long)MAX_PAYLOAD_SIZE);
399400
fprintf(stderr, "WFB-ng version " WFB_VERSION "\n");
@@ -491,7 +492,7 @@ int main(int argc, char * const *argv)
491492

492493
if(debug_port)
493494
{
494-
fprintf(stderr, "Using %lu ports from %d for wlan emulation\n", wlans.size(), debug_port);
495+
fprintf(stderr, "Using %zu ports from %d for wlan emulation\n", wlans.size(), debug_port);
495496
t = shared_ptr<UdpTransmitter>(new UdpTransmitter(k, n, keypair, "127.0.0.1", debug_port, epoch, channel_id));
496497
} else {
497498
t = shared_ptr<PcapTransmitter>(new PcapTransmitter(k, n, keypair, epoch, channel_id, wlans));

0 commit comments

Comments
 (0)