Do not cast away a const qualification on a variable type. Casting away the const qualification allows a program to modify a constant value, which is results in undefined behavior.
As an illustration, C99 provides a footnote:
...
Implementation Details
The gcc compiler GCC issues a warning when an implicit cast is performed.
...