Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd731ce9

Browse files
committed
Avoid sanitizer warnings
1 parent0e5f0e0 commitd731ce9

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

‎src/rum_ts_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pre_checkcondition_rum(void *checkval, QueryOperand *val, ExecPhraseData *data)
216216
j=gcv->map_item_operand[((QueryItem*)val)-gcv->first_item];
217217
/* return presence of current entry in indexed value */
218218
#ifPG_VERSION_NUM >=130000
219-
return (*(gcv->need_recheck) ?TS_MAYBE :gcv->check[j] );
219+
return (*(gcv->need_recheck) ?TS_MAYBE :(gcv->check[j] ?TS_YES :TS_NO) );
220220
#else
221221
returngcv->check[j];
222222
#endif
@@ -228,7 +228,7 @@ rum_tsquery_pre_consistent(PG_FUNCTION_ARGS)
228228
bool*check= (bool*)PG_GETARG_POINTER(0);
229229
TSQueryquery=PG_GETARG_TSQUERY(2);
230230
Pointer*extra_data= (Pointer*)PG_GETARG_POINTER(4);
231-
boolrecheck;
231+
boolrecheck= false;
232232
boolres= false;
233233

234234
if (query->size>0)

‎src/rumscan.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,12 @@ rumNewScanKey(IndexScanDesc scan)
703703
repalloc(so->entries,so->allocentries*sizeof(RumScanEntry));
704704
}
705705

706-
memcpy(so->entries+so->totalentries,
707-
key->scanEntry,sizeof(*key->scanEntry)*key->nentries);
708-
so->totalentries+=key->nentries;
706+
if (key->scanEntry!=NULL )
707+
{
708+
memcpy(so->entries+so->totalentries,
709+
key->scanEntry,sizeof(*key->scanEntry)*key->nentries);
710+
so->totalentries+=key->nentries;
711+
}
709712
}
710713

711714
/*

‎src/rumsort.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454

5555
/* GUC variables */
5656
#ifdefTRACE_SORT
57+
#ifndeftrace_sort
5758
booltrace_sort= false;
59+
#else
60+
trace_sort= false;
61+
#endif
5862
#endif
5963

6064
typedefstruct

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp