Fix deprecated function prototypes

This commit is contained in:
Christian W. Zuckschwerdt 2022-11-14 17:46:17 +01:00
parent d2608d1425
commit 1aa49c04f5
6 changed files with 8 additions and 10 deletions

View file

@ -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

View file

@ -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 };

View file

@ -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] : "?";

View file

@ -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"

View file

@ -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) {

View file

@ -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,