Skip to content

Commit

Permalink
Try to fix several warnings from issue eyalroz#65
Browse files Browse the repository at this point in the history
  • Loading branch information
valco1994 committed Feb 28, 2019
1 parent b7ff761 commit 8bfcfe6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,15 @@ gen_tbl (int tnum, DSS_HUGE start, DSS_HUGE count, long upd_num)
static int init = 0;
DSS_HUGE i;

int rows_per_segment=0;
int rows_this_segment=-1;
int residual_rows=0;
DSS_HUGE rows_per_segment=0;
DSS_HUGE rows_this_segment=-1;
DSS_HUGE residual_rows=0;

if (insert_segments)
{
{
rows_per_segment = count / insert_segments;
residual_rows = count - (rows_per_segment * insert_segments);
}
}

if (init == 0)
{
Expand Down Expand Up @@ -1169,7 +1169,7 @@ main (int ac, char **av)
rowcnt = tdefs[i].base;
#ifdef SSB
if(i==PART){
rowcnt = tdefs[i].base * (floor(1+log((double)(scale))/(log(2))));
rowcnt = tdefs[i].base * (long)(floor(1+log((double)(scale))/(log(2))));
}
if(i==DATE){
rowcnt = tdefs[i].base;
Expand Down
2 changes: 1 addition & 1 deletion src/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ extern tdef tdefs[];

#ifdef SSB
/*part table log based*/
#define L_PKEY_MAX (tdefs[PART].base * (floor(log((double)scale))+1))
#define L_PKEY_MAX (tdefs[PART].base * ((long)floor(log((double)scale))+1))
#else
#define L_PKEY_MAX (tdefs[PART].base * scale)
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,12 +550,12 @@ pr_drange(int tbl, DSS_HUGE min, DSS_HUGE cnt, long num)
{
static long last_num = 0;
static FILE *dfp = NULL;
int child = -1;
long start, last, new;
DSS_HUGE child = -1;
DSS_HUGE start, last, new;

static int rows_per_segment=0;
static int rows_this_segment=0;
static int residual_rows=0;
static DSS_HUGE rows_per_segment=0;
static DSS_HUGE rows_this_segment=0;
static DSS_HUGE residual_rows=0;

if (last_num != num)
{
Expand Down
4 changes: 2 additions & 2 deletions src/speed_seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ sd_part(int child, long skip_count)
}

long
sd_line(int child, long skip_count)
sd_line(int child, DSS_HUGE skip_count)
{
int i,j;

Expand All @@ -276,7 +276,7 @@ sd_line(int child, long skip_count)
}

long
sd_order(int child, long skip_count)
sd_order(int child, DSS_HUGE skip_count)
{
UNUSED(child);
ADVANCE_STREAM(O_LCNT_SD, skip_count);
Expand Down

0 comments on commit 8bfcfe6

Please sign in to comment.