On 07.01.2011 20:12, Diego Elio Pettenò wrote:
Il giorno mer, 05/01/2011 alle 13.03 +0100, Mathias Krause ha scritto:
static const char *speed_names[4] = {
I'd suggest using "static const char *const" at least (for PIE builds), or convert some of those to complete arrays.
I don't know how PIE may interference with this - it shouldn't matter if the array is writable or not - but you're right, the array should be marked const, too. Even though the compiler seems to be clever enough to notice no writes to the array are made and puts it into the .rodata section, too. Nevertheless, to be correct also on the source level, attached is a new version of the patch.
Thanks, for the review!
Kind regards, Mathias