Heikki's compiler doesn't complain about end_ptr, apparently,
but mine does.
In passing, I failed to resist the temptation to remove the
no-longer-used fldnum variable, and relocate chunk_len's
declaration to a narrower scope.
* to search for occurrences of fldsep.
*/
TextPositionState state;
- int fldnum;
- int chunk_len;
inputstring_len = VARSIZE_ANY_EXHDR(inputstring);
fldsep_len = VARSIZE_ANY_EXHDR(fldsep);
start_ptr = VARDATA_ANY(inputstring);
- for (fldnum = 1;; fldnum++) /* field number is 1 based */
+ for (;;)
{
bool found;
char *end_ptr;
+ int chunk_len;
CHECK_FOR_INTERRUPTS();
{
/* fetch last field */
chunk_len = ((char *) inputstring + VARSIZE_ANY(inputstring)) - start_ptr;
+ end_ptr = NULL; /* not used, but some compilers complain */
}
else
{