The warning was in the OP:
assignment discards 'const' qualifier from pointer target type
Your link helped. I had tried declaring as a pointer to constant data but then the two functions that use the pointer caused the same error. I had to change them to being passed a pointer to constant data, then it worked. Would have been a problem if I didn't have their source code!