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

Commit6119060

Browse files
committed
Fix possibly-uninitialized-variable warning from commit9556aa0.
Heikki's compiler doesn't complain about end_ptr, apparently,but mine does.In passing, I failed to resist the temptation to remove theno-longer-used fldnum variable, and relocate chunk_len'sdeclaration to a narrower scope.
1 parent9556aa0 commit6119060

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/utils/adt/varlena.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4613,8 +4613,6 @@ text_to_array_internal(PG_FUNCTION_ARGS)
46134613
* to search for occurrences of fldsep.
46144614
*/
46154615
TextPositionStatestate;
4616-
intfldnum;
4617-
intchunk_len;
46184616

46194617
inputstring_len=VARSIZE_ANY_EXHDR(inputstring);
46204618
fldsep_len=VARSIZE_ANY_EXHDR(fldsep);
@@ -4651,10 +4649,11 @@ text_to_array_internal(PG_FUNCTION_ARGS)
46514649

46524650
start_ptr=VARDATA_ANY(inputstring);
46534651

4654-
for (fldnum=1;;fldnum++)/* field number is 1 based */
4652+
for (;;)
46554653
{
46564654
boolfound;
46574655
char*end_ptr;
4656+
intchunk_len;
46584657

46594658
CHECK_FOR_INTERRUPTS();
46604659

@@ -4663,6 +4662,7 @@ text_to_array_internal(PG_FUNCTION_ARGS)
46634662
{
46644663
/* fetch last field */
46654664
chunk_len= ((char*)inputstring+VARSIZE_ANY(inputstring))-start_ptr;
4665+
end_ptr=NULL;/* not used, but some compilers complain */
46664666
}
46674667
else
46684668
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp