Skip to content

Commit 13c1ae2

Browse files
committed
Fix GCC 15 warnings and errors
1 parent 681ebb8 commit 13c1ae2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tpch-dbgen/driver.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
/* main driver for dss banchmark */
5555

5656
#define DECLARER /* EXTERN references get defined here */
57-
#define NO_FUNC (int (*) ()) NULL /* to clean up tdefs */
58-
#define NO_LFUNC (long (*) ()) NULL /* to clean up tdefs */
57+
58+
static long no_lfunc(int, long long int) {}
5959

6060
#include "config.h"
6161
#include "release.h"
@@ -179,25 +179,25 @@ long sd_part_psupp (int child, DSS_HUGE skip_count);
179179
tdef tdefs[] =
180180
{
181181
{"part.tbl", "part table", 200000,
182-
pr_part, sd_part, PSUPP, 0},
182+
(int (*)(void *, int))pr_part, sd_part, PSUPP, 0},
183183
{"partsupp.tbl", "partsupplier table", 200000,
184-
pr_psupp, sd_psupp, NONE, 0},
184+
(int (*)(void *, int))pr_psupp, sd_psupp, NONE, 0},
185185
{"supplier.tbl", "suppliers table", 10000,
186-
pr_supp, sd_supp, NONE, 0},
186+
(int (*)(void *, int))pr_supp, sd_supp, NONE, 0},
187187
{"customer.tbl", "customers table", 150000,
188-
pr_cust, sd_cust, NONE, 0},
188+
(int (*)(void *, int))pr_cust, sd_cust, NONE, 0},
189189
{"orders.tbl", "order table", 150000,
190-
pr_order, sd_order, LINE, 0},
190+
(int (*)(void *, int))pr_order, sd_order, LINE, 0},
191191
{"lineitem.tbl", "lineitem table", 150000,
192-
pr_line, sd_line, NONE, 0},
192+
(int (*)(void *, int))pr_line, sd_line, NONE, 0},
193193
{"orders.tbl", "orders/lineitem tables", 150000,
194-
pr_order_line, sd_order, LINE, 0},
194+
(int (*)(void *, int))pr_order_line, sd_order, LINE, 0},
195195
{"part.tbl", "part/partsupplier tables", 200000,
196-
pr_part_psupp, sd_part, PSUPP, 0},
196+
(int (*)(void *, int))pr_part_psupp, sd_part, PSUPP, 0},
197197
{"nation.tbl", "nation table", NATIONS_MAX,
198-
pr_nation, NO_LFUNC, NONE, 0},
198+
(int (*)(void *, int))pr_nation, no_lfunc, NONE, 0},
199199
{"region.tbl", "region table", NATIONS_MAX,
200-
pr_region, NO_LFUNC, NONE, 0},
200+
(int (*)(void *, int))pr_region, no_lfunc, NONE, 0},
201201
};
202202

203203
/*

tpch-dbgen/dss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ typedef struct
177177
char *name;
178178
char *comment;
179179
DSS_HUGE base;
180-
int (*loader) ();
181-
long (*gen_seed)();
180+
int (*loader) (void*, int);
181+
long (*gen_seed)(int, long long int);
182182
int child;
183183
DSS_HUGE vtotal;
184184
} tdef;

0 commit comments

Comments
 (0)