There is another thread on this but I could not see a solution other than ignore the warning. I don’t like compiling code with warnings. Can anyone help with a definitive solution please.
One thing worth noting here is that this way const applies only to the contents of the pointer and not to the pointer itself.
So you still could move the pointer to some other location, whereas if you did const char footer[] = "Admin Home "; the array and its contents are located in flash and hence unalterable.
Given this fact the reason why your former warning turned into an error becomes more obvious, because even if you tried to alter the contents or the pointer your program must fail, since flash is no RAM.
so neither the pointer nor the string may be altered.
you just don’t see enough of that syntax, but it surely shows you your intent about the immutable nature (constness) of footertextadminh if only by its eye-catching syntax.