Fix warning: cast from type `const char*` to type `char*` casts away qualifiers (#79520)
Do not cast `__FILE__` to `(char*)` in order to eliminate the prevalent `-Wcast-qual` warnings from showing up.
Fixes #79519
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79520
Approved by: https://github.com/malfet