Fix incompatible pointer warning

Just cast the result of `sp_key` to silence the warning.