From d54cd8a9a8b271481c198f7c0ae8258dea4be3e2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 23 Jun 2024 07:46:54 +0200 Subject: [PATCH 1/2] Remove unused variable debug_fd --- impl/src/main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/impl/src/main.c b/impl/src/main.c index 8707a0e..a9e7fa7 100644 --- a/impl/src/main.c +++ b/impl/src/main.c @@ -126,8 +126,6 @@ void cb_rx(rx_evt_t evt, const struct layer1_rx_s *rx, uint8_t *packet_data, siz } -static int debug_fd; - static result_t transmit(sdr_ctx_t *sdr, const float complex *samples, size_t len) { size_t to_transmit_rf = len * SDR_OVERSAMPLING; @@ -165,8 +163,6 @@ int main(int argc, char **argv) bool on_air = true; - debug_fd = open("/tmp/dump.cf32", O_CREAT | O_WRONLY | O_TRUNC); - // ** Initialize ** char devname[IFNAMSIZ] = "hamnet70"; @@ -368,8 +364,6 @@ int main(int argc, char **argv) } } - close(debug_fd); - // ** Cleanup ** layer1_tx_shutdown(&tx); -- 2.45.2 From 6032cd471df3833376043299ceb42c7e8fa80e15 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 23 Jun 2024 07:56:53 +0200 Subject: [PATCH 2/2] Fix compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - implicit declaration of function ‘isprint’ [-Wimplicit-function-declaration] - comparison between ‘result_t’ and ‘enum ’ [-Wenum-compare] --- impl/src/layer1/rx.c | 2 +- impl/src/utils.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/impl/src/layer1/rx.c b/impl/src/layer1/rx.c index 0944088..e264178 100644 --- a/impl/src/layer1/rx.c +++ b/impl/src/layer1/rx.c @@ -454,7 +454,7 @@ result_t layer1_rx_process(layer1_rx_t *rx, const float complex *samples, size_t payload_enc, 8, sizeof(payload_enc), &nsyms)); fec payload_fec = modcod_create_fec(rx->modcod); - result_t res = fec_decode(payload_fec, rx->payload_len_bytes, payload_enc, payload); + int res = fec_decode(payload_fec, rx->payload_len_bytes, payload_enc, payload); fec_destroy(payload_fec); if(res != LIQUID_OK) { diff --git a/impl/src/utils.c b/impl/src/utils.c index 7f8daa7..5d48336 100644 --- a/impl/src/utils.c +++ b/impl/src/utils.c @@ -1,4 +1,5 @@ #include +#include #include #include -- 2.45.2