MrBayes
MrBayes copied to clipboard
Variable 'j' may be uninitialized when used here
in mcmc.c, line 12987,
if (p->nValues == 1 && strcmp(mp->symPiPr,"Fixed") != 0)
{
SafeSprintf (&tempStr, &tempStrSize, "\t%s", MbPrintNum(sst[j]));
if (AddToPrintString (tempStr) == ERROR) goto errorExit;
}
there is a warning: "Variable 'j' may be uninitialized when used here"
This is likely a bug.
Related to commit bcda39b4
I think it is safe to delete in
else if (p->paramType == P_PI || p->paramType == P_MIXTURE_RATES)
that
if (p->nValues == 1 && strcmp(mp->symPiPr,"Fixed") != 0)
{
SafeSprintf (&tempStr, &tempStrSize, "\t%s", MbPrintNum(sst[j]));
if (AddToPrintString (tempStr) == ERROR) goto errorExit;
}
as this condition is never satisfied. @ronquist should be able to easily verify this suggestion.