Skip to content

Commit bc8d141

Browse files
committed
Fix residual strict-protoype compiler warnings
1 parent a9f2161 commit bc8d141

9 files changed

+9
-9
lines changed

src/readstat/readstat_bits.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "readstat_bits.h"
1010

11-
int machine_is_little_endian() {
11+
int machine_is_little_endian(void) {
1212
int test_byte_order = 1;
1313
return ((char *)&test_byte_order)[0];
1414
}

src/readstat/readstat_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "readstat.h"
44
#include "readstat_io_unistd.h"
55

6-
readstat_parser_t *readstat_parser_init() {
6+
readstat_parser_t *readstat_parser_init(void) {
77
readstat_parser_t *parser = calloc(1, sizeof(readstat_parser_t));
88
parser->io = calloc(1, sizeof(readstat_io_t));
99
if (unistd_io_init(parser) != READSTAT_OK) {

src/readstat/readstat_variable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
static readstat_value_t make_blank_value(void);
66
static readstat_value_t make_double_value(double dval);
77

8-
static readstat_value_t make_blank_value() {
8+
static readstat_value_t make_blank_value(void) {
99
readstat_value_t value = { .is_system_missing = 1, .v = { .double_value = NAN }, .type = READSTAT_TYPE_DOUBLE };
1010
return value;
1111
}

src/readstat/readstat_writer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ readstat_string_ref_t *readstat_string_ref_init(const char *string) {
3535
return ref;
3636
}
3737

38-
readstat_writer_t *readstat_writer_init() {
38+
readstat_writer_t *readstat_writer_init(void) {
3939
readstat_writer_t *writer = calloc(1, sizeof(readstat_writer_t));
4040

4141
writer->variables = calloc(VARIABLES_INITIAL_CAPACITY, sizeof(readstat_variable_t *));

src/readstat/sas/ieee.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int cnxptiee(const void *from_bytes, int fromtype, void *to_bytes, int totype)
9696
return(0);
9797
}
9898

99-
int get_native() {
99+
int get_native(void) {
100100
static unsigned char float_reps[][8] = {
101101
{0x41,0x10,0x00,0x00,0x00,0x00,0x00,0x00},
102102
{0x3f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00},

src/readstat/sas/readstat_sas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static readstat_charset_entry_t _charset_table[] = {
120120
{ .code = 248, .name = "SHIFT_JISX0213" },
121121
};
122122

123-
static time_t sas_epoch() {
123+
static time_t sas_epoch(void) {
124124
return - 3653 * 86400; // seconds between 01-01-1960 and 01-01-1970
125125
}
126126

src/readstat/sas/readstat_xport_read.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static readstat_error_t xport_update_progress(xport_ctx_t *ctx) {
4545
return io->update(ctx->file_size, ctx->handle.progress, ctx->user_ctx, io->io_ctx);
4646
}
4747

48-
static xport_ctx_t *xport_ctx_init() {
48+
static xport_ctx_t *xport_ctx_init(void) {
4949
xport_ctx_t *ctx = calloc(1, sizeof(xport_ctx_t));
5050
return ctx;
5151
}

src/readstat/spss/readstat_por.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ uint16_t por_unicode_lookup[256] = {
6464
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6565
0, 0, 0, 0, 0, 0 };
6666

67-
por_ctx_t *por_ctx_init() {
67+
por_ctx_t *por_ctx_init(void) {
6868
por_ctx_t *ctx = calloc(1, sizeof(por_ctx_t));
6969

7070
ctx->space = ' ';

src/readstat/spss/readstat_por_write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static readstat_error_t por_write_string_field(readstat_writer_t *writer, por_wr
167167
return por_write_string_field_n(writer, ctx, string, strlen(string));
168168
}
169169

170-
static por_write_ctx_t *por_write_ctx_init() {
170+
static por_write_ctx_t *por_write_ctx_init(void) {
171171
por_write_ctx_t *ctx = calloc(1, sizeof(por_write_ctx_t));
172172
uint16_t max_unicode = 0;
173173
int i;

0 commit comments

Comments
 (0)