A total fire ban will be enforced in Sydney and other parts of NSW on Friday with temperatures expected to top 40C during the hottest day of summer yet.