From 1aa49c04f5bbfcc97d2149567a384ac5753f58ad Mon Sep 17 00:00:00 2001
From: "Christian W. Zuckschwerdt" <christian@zuckschwerdt.org>
Date: Mon, 14 Nov 2022 17:46:17 +0100
Subject: [PATCH] Fix deprecated function prototypes

---
 src/baseband.c     | 2 +-
 src/compat_paths.c | 4 ++--
 src/devices/elv.c  | 4 +---
 src/devices/flex.c | 4 ++--
 src/pulse_detect.c | 2 +-
 tests/data-test.c  | 2 +-
 6 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/baseband.c b/src/baseband.c
index 0e5db881..dd8754be 100644
--- a/src/baseband.c
+++ b/src/baseband.c
@@ -21,7 +21,7 @@
 static uint16_t scaled_squares[256];
 
 /// precalculate lookup table for envelope detection.
-static void calc_squares()
+static void calc_squares(void)
 {
     if (scaled_squares[0])
         return; // already initialized
diff --git a/src/compat_paths.c b/src/compat_paths.c
index 53ef279a..772f8f67 100644
--- a/src/compat_paths.c
+++ b/src/compat_paths.c
@@ -13,7 +13,7 @@
 
 #include "compat_paths.h"
 
-char **compat_get_default_conf_paths()
+char **compat_get_default_conf_paths(void)
 {
     static char *paths[5] = { NULL };
     static char buf[256] = "";
@@ -41,7 +41,7 @@ char **compat_get_default_conf_paths()
 
 #include "compat_paths.h"
 
-char **compat_get_default_conf_paths()
+char **compat_get_default_conf_paths(void)
 {
     static char bufs[3][256];
     static char *paths[4] = { NULL };
diff --git a/src/devices/elv.c b/src/devices/elv.c
index ed52591e..11c4ba7d 100644
--- a/src/devices/elv.c
+++ b/src/devices/elv.c
@@ -33,7 +33,6 @@ static int em1000_callback(r_device *decoder, bitbuffer_t *bitbuffer)
     data_t *data;
     bitrow_t *bb = bitbuffer->bb;
     uint8_t dec[10];
-    uint8_t bytes=0;
     uint8_t bit=18; // preamble
     uint8_t bb_p[14];
     //char* types[] = {"EM 1000-S", "EM 1000-?", "EM 1000-GZ"};
@@ -63,7 +62,6 @@ static int em1000_callback(r_device *decoder, bitbuffer_t *bitbuffer)
             return DECODE_ABORT_EARLY;
         }
         checksum_calculated ^= dec[i];
-        bytes++;
     }
 
     // Read checksum
@@ -73,7 +71,7 @@ static int em1000_callback(r_device *decoder, bitbuffer_t *bitbuffer)
         return DECODE_FAIL_MIC;
     }
 
-//    decoder_log_bitrow(decoder, 0, __func__, dec, bytes * 8, "");
+//    decoder_log_bitrow(decoder, 0, __func__, dec, 9 * 8, "");
 
     // based on 15_CUL_EM.pm
     //char *subtype = dec[0] >= 1 && dec[0] <= 3 ? types[dec[0] - 1] : "?";
diff --git a/src/devices/flex.c b/src/devices/flex.c
index c5593142..de1637ba 100644
--- a/src/devices/flex.c
+++ b/src/devices/flex.c
@@ -341,14 +341,14 @@ static char *output_fields[] = {
         NULL,
 };
 
-static void usage()
+static void usage(void)
 {
     fprintf(stderr,
             "Use -X <spec> to add a general purpose decoder. For usage use -X help\n");
     exit(1);
 }
 
-static void help()
+static void help(void)
 {
     fprintf(stderr,
             "\t\t= Flex decoder spec =\n"
diff --git a/src/pulse_detect.c b/src/pulse_detect.c
index 9c57143d..a97a2737 100644
--- a/src/pulse_detect.c
+++ b/src/pulse_detect.c
@@ -52,7 +52,7 @@ struct pulse_detect {
     pulse_detect_fsk_t pulse_detect_fsk;
 };
 
-pulse_detect_t *pulse_detect_create()
+pulse_detect_t *pulse_detect_create(void)
 {
     pulse_detect_t *pulse_detect = calloc(1, sizeof(pulse_detect_t));
     if (!pulse_detect) {
diff --git a/tests/data-test.c b/tests/data-test.c
index 6c2c9623..245dc33b 100644
--- a/tests/data-test.c
+++ b/tests/data-test.c
@@ -23,7 +23,7 @@
 #include "data.h"
 #include "output_file.h"
 
-int main()
+int main(void)
 {
 	data_t *data = data_make("label"      , "",		DATA_STRING, "1.2.3",
 				 "house_code" , "House Code",	DATA_INT, 42,