This adds another cast to avoid pointer conversion warnings. Unfortunately C does not recognize implicit conversions that add cv-qualifiers as well as C++ does.