fix a compile warning

This change fixes the following compiler warning:

warning: type qualifiers ignored on function return type [-Wignored-qualifiers]