As you say, it is not an error, but merely a warning about wasting precious flash memory for uninitialized variables.
If it is indeed uninitialized, there seems to be no need to put it explicity into progmem as it is constant there and cannot be overwritten (easily) during program run.
The way you use it - have a tentative definition in all files which include the header file and define it in one file will make the compilation of the other files complain about exacly this. (This would better be a link time warning instead of a compile time warning...)
(BEGIN of long BLAH)
I just ran into the same issue: I want to create a "plugin" framework where the user of my library can choose whether to add a certain function pointer as a "plugin": in my library's header file, I have a
extern some_type * const PROGMEM my_array[];
and a
#define enable_my_stuff() some_type * const PROGMEM my_array[2] = {something_of_some_type, NULL}
while my library's C file has a
// Tentative definition which is used when nothing else is there.
some_type * const PROGMEM my_array[2];
This way I have two cases: either no one uses enable_my_stuff()
and my array is empty (that's ok, but 4 bytes are wasted) or enable_my_stuff()
is used, the extended functionality is activated and the array content reflects this.
It works, but I get exactly the warning as above. As it annoys me, I'm probably going to implement it in a different way.
(END of long BLAH)