I think I was mistaken. I was corrected earlier. For some reason I could have swore that was a thing. I remember people saying they had to wipe their phones to make sure Apple couldn’t tell they had jailbroke their phone. But maybe I just be wrong.I don’t think you void the Apple warranty. Doesn’t that only extend to hardware components and issues with the workmanship? If you find a warranty agreement from Apple that covers software please point me to it.
Edit: A Google search indicates that if Apple became aware that you jailbroke your phone, whether it be for repair or service, it voided the 1 year warranty. If you were able to restore to factory settings first, you were good to go.