for (PRUint32 i = aStartIndex; (aForward ? i < numOptions : i != -1); i += (aForward ? 1 : -1)) {
for (PRInt32 i = aStartIndex; (aForward ? i < (PRInt32)numOptions : i != -1); i += (aForward ? 1 : -1)) {
nsHTMLSelectElement::GetOptionIndex(nsIDOMHTMLOptionElement* aOption,                                    PRInt32 aStartIndex, PRBool aForward,                                    PRInt32* aIndex){  NS_ENSURE_ARG_POINTER(aIndex);  PRUint32 numOptions;  nsresult rv = GetLength(&numOptions);  if (NS_FAILED(rv)) {    return rv;  }  aStartIndex = PR_MIN(aStartIndex, numOptions - 1);  aStartIndex = PR_MAX(0, aStartIndex);  nsCOMPtr<nsIDOMNode> node;  for (PRUint32 i = aStartIndex; (aForward ? i < numOptions : i != -1); i += (aForward ? 1 : -1)) {    rv = Item(i, getter_AddRefs(node));    if (NS_SUCCEEDED(rv) && node) {      nsCOMPtr<nsIDOMHTMLOptionElement> option(do_QueryInterface(node));      if (option && option.get() == aOption) {        *aIndex = i;        return NS_OK;      }    }  }  return NS_ERROR_FAILURE;}