Fix a warning about the use of const being ignored with a cast.