mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Fix compiler warnings
- Removed conversion from size_t to uint32 - Removed not used variables and silence warnings from mronga/vendor/gronga/lib/ii.c
This commit is contained in:
parent
f0bef17b82
commit
ee65b7bd1f
2 changed files with 11 additions and 11 deletions
|
|
@ -55,7 +55,7 @@ public:
|
||||||
}
|
}
|
||||||
uint32 elements() const
|
uint32 elements() const
|
||||||
{
|
{
|
||||||
return length() / sizeof(MY_XPATH_FLT);
|
return length() / (uint32) sizeof(MY_XPATH_FLT);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
20
storage/mroonga/vendor/groonga/lib/ii.c
vendored
20
storage/mroonga/vendor/groonga/lib/ii.c
vendored
|
|
@ -488,7 +488,7 @@ chunk_new(grn_ctx *ctx, grn_ii *ii, uint32_t *res, uint32_t size)
|
||||||
return ctx->rc;
|
return ctx->rc;
|
||||||
} else {
|
} else {
|
||||||
uint32_t *vp;
|
uint32_t *vp;
|
||||||
int m, aligned_size;
|
int m;
|
||||||
if (size > (1 << GRN_II_W_LEAST_CHUNK)) {
|
if (size > (1 << GRN_II_W_LEAST_CHUNK)) {
|
||||||
int es = size - 1;
|
int es = size - 1;
|
||||||
GRN_BIT_SCAN_REV(es, m);
|
GRN_BIT_SCAN_REV(es, m);
|
||||||
|
|
@ -496,7 +496,6 @@ chunk_new(grn_ctx *ctx, grn_ii *ii, uint32_t *res, uint32_t size)
|
||||||
} else {
|
} else {
|
||||||
m = GRN_II_W_LEAST_CHUNK;
|
m = GRN_II_W_LEAST_CHUNK;
|
||||||
}
|
}
|
||||||
aligned_size = 1 << (m - GRN_II_W_LEAST_CHUNK);
|
|
||||||
if (ii->header->ngarbages[m - GRN_II_W_LEAST_CHUNK] > N_GARBAGES_TH) {
|
if (ii->header->ngarbages[m - GRN_II_W_LEAST_CHUNK] > N_GARBAGES_TH) {
|
||||||
grn_ii_ginfo *ginfo;
|
grn_ii_ginfo *ginfo;
|
||||||
uint32_t *gseg;
|
uint32_t *gseg;
|
||||||
|
|
@ -2856,7 +2855,7 @@ chunk_merge(grn_ctx *ctx, grn_ii *ii, buffer *sb, buffer_term *bt,
|
||||||
|
|
||||||
if (scp) {
|
if (scp) {
|
||||||
uint16_t nextb = *nextbp;
|
uint16_t nextb = *nextbp;
|
||||||
uint32_t snn = 0, *srp, *ssp = NULL, *stp, *sop = NULL, *snp;
|
uint32_t *srp, *ssp = NULL, *stp, *sop = NULL, *snp;
|
||||||
uint8_t *sbp = *sbpp;
|
uint8_t *sbp = *sbpp;
|
||||||
datavec rdv[MAX_N_ELEMENTS + 1];
|
datavec rdv[MAX_N_ELEMENTS + 1];
|
||||||
size_t bufsize = S_SEGMENT * ii->n_elements;
|
size_t bufsize = S_SEGMENT * ii->n_elements;
|
||||||
|
|
@ -2873,7 +2872,6 @@ chunk_merge(grn_ctx *ctx, grn_ii *ii, buffer *sb, buffer_term *bt,
|
||||||
if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; }
|
if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; }
|
||||||
stp = rdv[j++].data;
|
stp = rdv[j++].data;
|
||||||
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
||||||
snn = rdv[j].data_size;
|
|
||||||
snp = rdv[j].data;
|
snp = rdv[j].data;
|
||||||
}
|
}
|
||||||
datavec_reset(ctx, dv, ii->n_elements, sdf + S_SEGMENT, bufsize);
|
datavec_reset(ctx, dv, ii->n_elements, sdf + S_SEGMENT, bufsize);
|
||||||
|
|
@ -3044,7 +3042,7 @@ buffer_merge(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h,
|
||||||
chunk_info *cinfo = NULL;
|
chunk_info *cinfo = NULL;
|
||||||
grn_id crid = GRN_ID_NIL;
|
grn_id crid = GRN_ID_NIL;
|
||||||
docinfo cid = {0, 0, 0, 0, 0}, lid = {0, 0, 0, 0, 0}, bid = {0, 0, 0, 0, 0};
|
docinfo cid = {0, 0, 0, 0, 0}, lid = {0, 0, 0, 0, 0}, bid = {0, 0, 0, 0, 0};
|
||||||
uint32_t sdf = 0, snn = 0, ndf;
|
uint32_t sdf = 0, ndf;
|
||||||
uint32_t *srp = NULL, *ssp = NULL, *stp = NULL, *sop = NULL, *snp = NULL;
|
uint32_t *srp = NULL, *ssp = NULL, *stp = NULL, *sop = NULL, *snp = NULL;
|
||||||
if (!bt->tid) {
|
if (!bt->tid) {
|
||||||
nterms_void++;
|
nterms_void++;
|
||||||
|
|
@ -3130,7 +3128,6 @@ buffer_merge(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h,
|
||||||
if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; }
|
if ((ii->header->flags & GRN_OBJ_WITH_SECTION)) { ssp = rdv[j++].data; }
|
||||||
stp = rdv[j++].data;
|
stp = rdv[j++].data;
|
||||||
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
||||||
snn = rdv[j].data_size;
|
|
||||||
snp = rdv[j].data;
|
snp = rdv[j].data;
|
||||||
}
|
}
|
||||||
datavec_reset(ctx, dv, ii->n_elements, sdf + S_SEGMENT, size);
|
datavec_reset(ctx, dv, ii->n_elements, sdf + S_SEGMENT, size);
|
||||||
|
|
@ -3541,8 +3538,12 @@ grn_ii_buffer_check(grn_ctx *ctx, grn_ii *ii, uint32_t seg)
|
||||||
chunk_info *cinfo = NULL;
|
chunk_info *cinfo = NULL;
|
||||||
grn_id crid = GRN_ID_NIL;
|
grn_id crid = GRN_ID_NIL;
|
||||||
docinfo bid = {0, 0, 0, 0, 0};
|
docinfo bid = {0, 0, 0, 0, 0};
|
||||||
uint32_t sdf = 0, snn = 0;
|
uint32_t sdf = 0;
|
||||||
uint32_t *srp = NULL, *ssp = NULL, *stp = NULL, *sop = NULL, *snp = NULL;
|
uint32_t *srp __attribute__((unused)) = NULL;
|
||||||
|
uint32_t *ssp __attribute__((unused)) = NULL;
|
||||||
|
uint32_t *stp __attribute__((unused)) = NULL;
|
||||||
|
uint32_t *sop __attribute__((unused)) = NULL;
|
||||||
|
uint32_t *snp __attribute__((unused)) = NULL;
|
||||||
if (!bt->tid && !bt->pos_in_buffer && !bt->size_in_buffer) {
|
if (!bt->tid && !bt->pos_in_buffer && !bt->size_in_buffer) {
|
||||||
nterms_void++;
|
nterms_void++;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -3597,7 +3598,6 @@ grn_ii_buffer_check(grn_ctx *ctx, grn_ii *ii, uint32_t seg)
|
||||||
stp = rdv[j++].data;
|
stp = rdv[j++].data;
|
||||||
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
if ((ii->header->flags & GRN_OBJ_WITH_WEIGHT)) { sop = rdv[j++].data; }
|
||||||
GRN_OUTPUT_INT64(rdv[j].data_size);
|
GRN_OUTPUT_INT64(rdv[j].data_size);
|
||||||
snn = rdv[j].data_size;
|
|
||||||
snp = rdv[j].data;
|
snp = rdv[j].data;
|
||||||
}
|
}
|
||||||
nterm_with_chunk++;
|
nterm_with_chunk++;
|
||||||
|
|
@ -4119,7 +4119,7 @@ buffer_new_lexicon_pat(grn_ctx *ctx,
|
||||||
*lseg == GRN_II_PSEG_NOT_ASSIGNED &&
|
*lseg == GRN_II_PSEG_NOT_ASSIGNED &&
|
||||||
(tid = grn_pat_cursor_next(ctx, cursor))) {
|
(tid = grn_pat_cursor_next(ctx, cursor))) {
|
||||||
void *current_key;
|
void *current_key;
|
||||||
int current_key_size;
|
int current_key_size __attribute__((unused));
|
||||||
|
|
||||||
current_key_size = grn_pat_cursor_get_key(ctx, cursor, ¤t_key);
|
current_key_size = grn_pat_cursor_get_key(ctx, cursor, ¤t_key);
|
||||||
if (memcmp(((char *)current_key) + target_key_size,
|
if (memcmp(((char *)current_key) + target_key_size,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue