Skip to content

Commit 3a6fa3c

Browse files
author
Burak Yücesoy
authored
Merge pull request citusdata#58 from citusdata/small-fixes
Small fixes around format specifier flags and .gitignore
2 parents d89a3fb + 8129929 commit 3a6fa3c

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ regression.out
55
regression.diffs
66
results
77

8-
hll--?.?.sql
9-
hll--?.?-*.sql
10-
!hll--?.?-*--?.?-*.sql
8+
hll--*.*.sql
9+
!hll--*.*--*.*.sql

src/hll.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ check_metadata(multiset_t const * i_omp, multiset_t const * i_imp)
540540
ereport(ERROR,
541541
(errcode(ERRCODE_DATA_EXCEPTION),
542542
errmsg("register width does not match: "
543-
"source uses %ld and dest uses %ld",
543+
"source uses %zu and dest uses %zu",
544544
i_imp->ms_nbits, i_omp->ms_nbits)));
545545
}
546546

@@ -549,7 +549,7 @@ check_metadata(multiset_t const * i_omp, multiset_t const * i_imp)
549549
ereport(ERROR,
550550
(errcode(ERRCODE_DATA_EXCEPTION),
551551
errmsg("register count does not match: "
552-
"source uses %ld and dest uses %ld",
552+
"source uses %zu and dest uses %zu",
553553
i_imp->ms_nregs, i_omp->ms_nregs)));
554554
}
555555

@@ -680,7 +680,7 @@ multiset_tostring(multiset_t const * i_msp)
680680
// with the automatically determined value.
681681
//
682682
if (expthresh == -1)
683-
snprintf(expbuf, sizeof(expbuf), INT64_FORMAT "(%ld)", expthresh, expval);
683+
snprintf(expbuf, sizeof(expbuf), INT64_FORMAT "(%zu)", expthresh, expval);
684684
else
685685
snprintf(expbuf, sizeof(expbuf), INT64_FORMAT, expthresh);
686686

@@ -697,7 +697,7 @@ multiset_tostring(multiset_t const * i_msp)
697697
{
698698
case MST_EMPTY:
699699
used += snprintf(retstr, len, "EMPTY, "
700-
"nregs=%ld, nbits=%ld, expthresh=%s, sparseon=%ld",
700+
"nregs=%zu, nbits=%zu, expthresh=%s, sparseon=%zu",
701701
nregs, nbits, expbuf, sparseon);
702702
break;
703703
case MST_EXPLICIT:
@@ -707,15 +707,15 @@ multiset_tostring(multiset_t const * i_msp)
707707
char linebuf[1024];
708708
ssize_t rv;
709709

710-
used += snprintf(retstr, len, "EXPLICIT, %ld elements, "
711-
"nregs=%ld, nbits=%ld, "
712-
"expthresh=%s, sparseon=%ld:",
710+
used += snprintf(retstr, len, "EXPLICIT, %zu elements, "
711+
"nregs=%zu, nbits=%zu, "
712+
"expthresh=%s, sparseon=%zu:",
713713
size, nregs, nbits, expbuf, sparseon);
714714
for (size_t ii = 0; ii < size; ++ii)
715715
{
716716
int64_t val = * (int64_t const *) & msep->mse_elems[ii];
717717
rv = snprintf(linebuf, sizeof(linebuf),
718-
"\n%ld: %20" PRIi64 " ",
718+
"\n%zu: %20" PRIi64 " ",
719719
ii, val);
720720
// Do we need to reallocate the return buffer?
721721
if (rv + used > len - 1)
@@ -739,16 +739,16 @@ multiset_tostring(multiset_t const * i_msp)
739739
size_t ndx = 0;
740740

741741
used += snprintf(retstr, len,
742-
"COMPRESSED, %ld filled "
743-
"nregs=%ld, nbits=%ld, expthresh=%s, "
744-
"sparseon=%ld:",
742+
"COMPRESSED, %zu filled "
743+
"nregs=%zu, nbits=%zu, expthresh=%s, "
744+
"sparseon=%zu:",
745745
numfilled(i_msp),
746746
nregs, nbits, expbuf, sparseon);
747747

748748
for (size_t rr = 0; rr < nrows; ++rr)
749749
{
750750
size_t pos = 0;
751-
pos = snprintf(linebuf, sizeof(linebuf), "\n%4ld: ", ndx);
751+
pos = snprintf(linebuf, sizeof(linebuf), "\n%4zu: ", ndx);
752752
for (size_t cc = 0; cc < rowsz; ++cc)
753753
{
754754
pos += snprintf(&linebuf[pos], sizeof(linebuf) - pos,
@@ -769,7 +769,7 @@ multiset_tostring(multiset_t const * i_msp)
769769
break;
770770
case MST_UNDEFINED:
771771
used += snprintf(retstr, len, "UNDEFINED "
772-
"nregs=%ld, nbits=%ld, expthresh=%s, sparseon=%ld",
772+
"nregs=%zu, nbits=%zu, expthresh=%s, sparseon=%zu",
773773
nregs, nbits, expbuf, sparseon);
774774
break;
775775
default:

0 commit comments

Comments
 (0)